Skip to main content
Glama

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
NameRequiredDescriptionDefault
workflowIdYesThe unique workflow execution ID
includeTaskDetailsNoInclude detailed task information (default: true)

Implementation Reference

  • 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)}`, }, ], }; }
  • 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"], }, },
  • 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 }; }
  • 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"}` : ""}`; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/opensensor/conductor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server