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 }),
        });
    }

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