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"}` : ""}`;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that it returns 'complete workflow execution details including tasks, input/output, and current status', which adds behavioral context beyond the input schema. However, it does not cover aspects like error handling, permissions, or rate limits, leaving gaps for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose and followed by details on return values. Every sentence adds value without redundancy, making it efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description provides good context by specifying what is returned (details including tasks, input/output, status). However, it lacks information on error cases or response structure, which could be important for a tool with no structured output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (workflowId and includeTaskDetails). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or usage tips, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('workflow execution by its ID'), specifying it returns 'current status and details' and 'complete workflow execution details including tasks, input/output, and current status'. This distinguishes it from siblings like list_workflows (which lists multiple workflows) or get_task_details (which focuses on tasks).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by stating 'by its ID', suggesting it's for retrieving a specific workflow execution, but it does not explicitly mention when to use this versus alternatives like search_workflows or list_workflows. No exclusions or prerequisites are provided, leaving some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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