get_workflow_status
Retrieve current execution status and detailed information for a specific workflow using its unique ID, including tasks, inputs/outputs, and progress.
Instructions
Get the current status and details of a specific workflow execution by its ID. Returns complete workflow execution details including tasks, input/output, and current status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The unique workflow execution ID | |
| includeTaskDetails | No | Include detailed task information (default: true) |
Implementation Reference
- src/index.ts:823-856 (handler)The main handler logic for the 'get_workflow_status' tool. It validates the workflow ID, fetches the workflow execution details from the Conductor API endpoint `/workflow/{workflowId}`, optionally includes task details, generates a human-readable summary using the summarizeWorkflow helper, and returns a formatted response with summary and full JSON details.case "get_workflow_status": { const { workflowId, includeTaskDetails = true } = args as any; // Validate workflow ID const validation = validateWorkflowId(workflowId); if (!validation.valid) { return { content: [ { type: "text", text: `β Validation Error: ${validation.error}`, }, ], isError: true, }; } const url = `/workflow/${workflowId}`; const params = includeTaskDetails ? { includeTasks: true } : {}; const response = await conductorClient.get(url, { params }); // Add summary for better readability const summary = summarizeWorkflow(response.data); return { content: [ { type: "text", text: `${summary}\n\nπ Full Details:\n${JSON.stringify(response.data, null, 2)}`, }, ], }; }
- src/index.ts:227-245 (schema)The tool definition including name, description, and input schema (JSON Schema for validation). This is returned by list_tools and used for input validation.{ name: "get_workflow_status", description: "Get the current status and details of a specific workflow execution by its ID. Returns complete workflow execution details including tasks, input/output, and current status.", inputSchema: { type: "object", properties: { workflowId: { type: "string", description: "The unique workflow execution ID", }, includeTaskDetails: { type: "boolean", description: "Include detailed task information (default: true)", }, }, required: ["workflowId"], }, },
- src/index.ts:74-84 (helper)Helper function specifically used by the get_workflow_status handler to validate the format of the workflowId parameter (checks for non-empty and UUID format).function validateWorkflowId(workflowId: string): { valid: boolean; error?: string } { if (!workflowId || workflowId.trim() === "") { return { valid: false, error: "Workflow ID cannot be empty" }; } // Basic UUID validation (Conductor typically uses UUIDs) const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; if (!uuidRegex.test(workflowId)) { return { valid: false, error: `Invalid workflow ID format. Expected UUID format, got: ${workflowId}` }; } return { valid: true }; }
- src/index.ts:94-106 (helper)Helper function used by the get_workflow_status handler to generate a concise, human-readable summary of the workflow status, including ID, status, start time, duration, and failed tasks if applicable.function summarizeWorkflow(workflow: any): string { const duration = workflow.endTime ? workflow.endTime - workflow.startTime : Date.now() - workflow.startTime; const durationSec = Math.floor(duration / 1000); return `π Workflow: ${workflow.workflowName || workflow.workflowType} (v${workflow.version || workflow.workflowVersion}) π ID: ${workflow.workflowId} π Status: ${workflow.status} β±οΈ Started: ${formatTimestamp(workflow.startTime)} β³ Duration: ${durationSec}s ${workflow.status === "FAILED" ? `β Failed Tasks: ${workflow.failedTaskNames?.join(", ") || "N/A"}` : ""}`; }