UNPKG

bc-webclient-mcp

Version:

Model Context Protocol (MCP) server for Microsoft Dynamics 365 Business Central via WebUI protocol. Enables AI assistants to interact with BC through the web client protocol, supporting Card, List, and Document pages with full line item support and server

61 lines 2.18 kB
/** * Create Record MCP Tool * * Convenience helper that combines get_page_metadata, execute_action("New"), * and write_page_data to create a new record in a single call. * * This is a composite tool that simplifies common workflows. */ import { BaseMCPTool } from '../base-tool.js'; import type { Result } from '../../core/result.js'; import type { BCError } from '../../core/errors.js'; import type { IBCConnection } from '../../core/interfaces.js'; import type { CreateRecordInput, CreateRecordOutput } from '../../types/mcp-types.js'; import type { AuditLogger } from '../../services/audit-logger.js'; /** * MCP Tool: create_record * * Creates a new record by combining page opening, New action, and field setting. */ export declare class CreateRecordTool extends BaseMCPTool { private readonly connection; private readonly bcConfig?; readonly name = "create_record"; readonly description: string; readonly inputSchema: { type: string; properties: { pageId: { type: string[]; description: string; }; fields: { type: string; description: string; additionalProperties: boolean; }; }; required: string[]; }; readonly requiresConsent = true; readonly sensitivityLevel: "medium"; readonly consentPrompt = "Create a new record in Business Central? This will add data to your Business Central database."; private readonly getPageMetadataTool; private readonly executeActionTool; private readonly writePageDataTool; constructor(connection: IBCConnection, bcConfig?: { baseUrl: string; username: string; password: string; tenantId: string; } | undefined, auditLogger?: AuditLogger); /** * Validates and extracts input. */ protected validateInput(input: unknown): Result<CreateRecordInput, BCError>; /** * Executes the tool to create a new record. */ protected executeInternal(input: unknown): Promise<Result<CreateRecordOutput, BCError>>; } //# sourceMappingURL=create-record-tool.d.ts.map