Skip to main content
Glama

validate_workflow

Validate workflow pipeline definitions to detect errors like missing connections, required fields, unreachable steps, and invalid configurations before execution.

Instructions

Validate a workflow's pipeline definition. Returns structured errors per step. Use this after creating or updating a workflow to check for:

  • Missing step connections (broken next.stepId references)

  • Missing required fields (app action without inputs, AI step without prompt)

  • Unreachable steps (not connected to the trigger chain)

  • Invalid app/action IDs (not in the app registry)

  • Missing trigger or milestone steps

  • List field misconfigurations (missing itemFields, defaultValue format mismatches)

  • Config page field validation (missing name/type on input page fields)

Each error/warning may include a "suggestedFix" with a concrete remediation.

You can also pass a pipeline object to validate a draft before saving. Returns: { valid: boolean, errors: [...], warnings: [...], stepCount: number }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe workflow ID to validate
pipelineNoOptional draft pipeline to validate before saving (merged with stored pipeline)

Implementation Reference

  • Registration and handler for validate_workflow tool.
        server.tool(
            'validate_workflow',
            `Validate a workflow's pipeline definition. Returns structured errors per step.
    Use this after creating or updating a workflow to check for:
    - Missing step connections (broken next.stepId references)
    - Missing required fields (app action without inputs, AI step without prompt)
    - Unreachable steps (not connected to the trigger chain)
    - Invalid app/action IDs (not in the app registry)
    - Missing trigger or milestone steps
    - List field misconfigurations (missing itemFields, defaultValue format mismatches)
    - Config page field validation (missing name/type on input page fields)
    
    Each error/warning may include a "suggestedFix" with a concrete remediation.
    
    You can also pass a pipeline object to validate a draft before saving.
    Returns: { valid: boolean, errors: [...], warnings: [...], stepCount: number }`,
            {
                workflowId: z.string().describe('The workflow ID to validate'),
                pipeline: z.record(z.string(), z.any()).optional().describe('Optional draft pipeline to validate before saving (merged with stored pipeline)'),
            },
            async ({ workflowId, pipeline }, extra) => {
                const client = clientFactory(extra);
                const result = await client.validateWorkflow(workflowId, pipeline);
                return {
                    content: [{
                        type: 'text' as const,
                        text: JSON.stringify(result, null, 2),
                    }],
                };
            }
        );
  • The API client method that performs the network request for workflow validation.
    async validateWorkflow(id: string, pipeline?: Record<string, any>) {
        return this.request(`/workflows/${id}/validate`, {
            method: 'POST',
            body: JSON.stringify({ pipeline }),
        });
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior by detailing the types of errors checked, the return structure, and the ability to validate drafts. However, it does not mention permissions, rate limits, or side effects, leaving some behavioral aspects unclear.

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 well-structured and front-loaded with the main purpose, followed by detailed validation checks and usage notes. It is appropriately sized, but the bulleted list of checks, while informative, could be slightly condensed for better conciseness without losing clarity.

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 the complexity of validation and lack of annotations or output schema, the description does a good job of explaining what the tool does, what it checks, and the return format. However, it could be more complete by including error examples, handling of edge cases, or prerequisites, which would enhance contextual understanding.

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 pipeline). The description adds context by explaining that the pipeline parameter is for 'validating a draft before saving,' but it does not provide additional semantic details beyond what the schema offers. This meets the baseline for high schema 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 specific action ('validate a workflow's pipeline definition') and resource ('workflow'), distinguishing it from siblings like create_workflow, update_workflow, or get_workflow. It explicitly mentions what the validation checks for, making the purpose unambiguous and distinct.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool ('after creating or updating a workflow' and 'to validate a draft before saving'), but it does not explicitly mention when not to use it or name specific alternatives among siblings. This gives good guidance but lacks exclusion criteria.

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/Agentled/mcp-server'

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