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
52 lines • 1.93 kB
TypeScript
/**
* End Workflow Tool
*
* Completes, fails, or cancels a workflow.
* Use this when a workflow reaches a terminal state (success, failure, or cancellation).
*/
import type { Result } from '../core/result.js';
import type { BCError } from '../core/errors.js';
import { BaseMCPTool } from './base-tool.js';
/**
* Input schema for end_workflow tool.
*/
export interface EndWorkflowInput {
readonly workflowId: string;
readonly status: 'completed' | 'failed' | 'cancelled';
readonly message?: string;
}
/**
* EndWorkflowTool terminates a workflow with a final status.
*
* Terminal states:
* - completed: Workflow succeeded
* - failed: Workflow encountered errors
* - cancelled: Workflow was explicitly cancelled
*
* The workflow context is retained for introspection but no longer active.
*/
export declare class EndWorkflowTool extends BaseMCPTool {
readonly name = "end_workflow";
readonly description = "End a workflow with a final status (completed, failed, or cancelled). The workflow state is retained for history but marked as inactive.";
readonly inputSchema: {
readonly type: "object";
readonly properties: {
readonly workflowId: {
readonly type: "string";
readonly description: "The workflow ID to end";
};
readonly status: {
readonly type: "string";
readonly enum: readonly ["completed", "failed", "cancelled"];
readonly description: "Final workflow status";
};
readonly message: {
readonly type: "string";
readonly description: "Optional completion or error message";
};
};
readonly required: readonly ["workflowId", "status"];
};
protected executeInternal(input: unknown): Promise<Result<unknown, BCError>>;
}
//# sourceMappingURL=end-workflow-tool.d.ts.map