terminate_workflow
Stop a workflow execution and mark it as terminated in the Conductor workflow engine. Provide the workflow ID and optional reason for termination.
Instructions
Terminate a workflow execution. This will stop the workflow and mark it as terminated.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow execution ID to terminate | |
| reason | No | Reason for termination |
Implementation Reference
- src/index.ts:540-554 (handler)The handler function for the 'terminate_workflow' tool. It destructures workflowId and optional reason from input arguments, performs a DELETE request to the Conductor API endpoint `/workflow/${workflowId}` with the reason as a query parameter, and returns a success message.case "terminate_workflow": { const { workflowId, reason = "Terminated via MCP" } = args as any; await conductorClient.delete(`/workflow/${workflowId}`, { params: { reason }, }); return { content: [ { type: "text", text: `Workflow ${workflowId} terminated successfully. Reason: ${reason}`, }, ], }; }
- src/index.ts:146-164 (registration)The tool registration in the tools array, including name, description, and input schema. This is returned by the list tools handler.{ name: "terminate_workflow", description: "Terminate a workflow execution. This will stop the workflow and mark it as terminated.", inputSchema: { type: "object", properties: { workflowId: { type: "string", description: "The workflow execution ID to terminate", }, reason: { type: "string", description: "Reason for termination", }, }, required: ["workflowId"], }, },
- src/index.ts:150-163 (schema)The input schema definition for the terminate_workflow tool, specifying workflowId as required string and optional reason string.inputSchema: { type: "object", properties: { workflowId: { type: "string", description: "The workflow execution ID to terminate", }, reason: { type: "string", description: "Reason for termination", }, }, required: ["workflowId"], },