Skip to main content
Glama

template_get_workflow_status

Check the current status of a workflow by providing its workflow ID. Returns workflow state information.

Instructions

[API] Get the status of a workflow

⚡️ Best for: ✓ Checking workflow status

⚠️ Not for: × Creating new services

→ Next steps: service_info

→ Related: template_list, template_deploy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesID of the workflow to get the status of

Implementation Reference

  • Service method that handles the workflow status check logic. Calls the API repo, interprets the response, and returns a success/error message.
    async getWorkflowStatus(workflowId: string) {
      const response = await this.client.templates.getWorkflowStatus(workflowId);
    
      if (response.error) {
        return createErrorResponse(`Error with workflow ${workflowId}: ${response.error}`);
      }
    
      if (response.status.toLowerCase() === 'complete') {
        return createSuccessResponse({
          text: `Workflow ${workflowId} completed successfully`,
          data: response
        });
      }
    
      return createSuccessResponse({
        text: `Workflow ${workflowId} is still running. Status: ${response.status}`,
        data: response
      });
    }
  • Zod schema defining the input parameter: workflowId (string) is required.
    {
      workflowId: z.string().describe("ID of the workflow to get the status of")
    },
  • Tool registration using createTool with name 'template_get_workflow_status', description, schema, and handler.
    createTool(
      "template_get_workflow_status",
      formatToolDescription({
        type: 'API',
        description: "Get the status of a workflow",
        bestFor: ["Checking workflow status"],
        notFor: ["Creating new services"],
        relations: {
          nextSteps: ["service_info"],
          related: ["template_list, template_deploy"]
        }
      }),
      {
        workflowId: z.string().describe("ID of the workflow to get the status of")
      },
      async ({ workflowId }) => {
        return templatesService.getWorkflowStatus(workflowId);
      }
    ),
  • Low-level API repository method that executes the GraphQL query to get workflow status from the Railway API.
    async getWorkflowStatus(workflowId: string) {
      const query = `
        query workflowStatus($workflowId:String!){
          workflowStatus(workflowId:$workflowId) {
            status
            error
          }
        }
      `;
    
      const response = await this.client.request<{ workflowStatus: { status: string, error: string | null } }>(query, { workflowId });
      return response.workflowStatus;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose behavioral traits like read-only, authentication needs, or rate limits. The simple 'get' implies a read operation but is not explicit.

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

Conciseness4/5

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

The description is very concise, using bullet points and emojis for clarity. Every sentence adds value, with no wasted words. However, the best-for section slightly repeats the purpose.

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

Completeness3/5

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

Given the low complexity (one parameter, no output schema), the description is adequate for basic usage but could mention possible status values or if there are any side effects.

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 coverage is 100% with a clear parameter description. The tool description adds no additional parameter information beyond what the schema provides, so score is baseline 3.

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 it gets the status of a workflow, and the best-for section reinforces this. It distinguishes itself from siblings like template_list and template_deploy by focusing on status retrieval.

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

Usage Guidelines5/5

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

The description explicitly says when to use (checking workflow status) and when not to (creating new services), and provides next steps and related tools, offering clear guidance.

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/jason-tan-swe/railway-mcp'

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