Skip to main content
Glama

update_step

Modify a specific workflow step by merging updates into existing fields while preserving all other steps and data unchanged.

Instructions

Update a single step in a workflow by step ID. Only the specified fields are merged — all other steps and fields remain unchanged. This is SAFER than update_workflow with steps because it cannot accidentally replace or delete other steps.

Use this instead of update_workflow when you only need to change one step (e.g., update a prompt, change inputs, modify entry conditions). Deep-merges nested objects like pipelineStepPrompt, stepInputData, and entryConditions.

For live workflows, changes are routed to a draft snapshot (same behavior as update_workflow).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe workflow ID
stepIdYesThe step ID to update (e.g., "analyze", "scrape-company")
updatesYesPartial step updates to merge. Examples: { name: "New Name" }, { pipelineStepPrompt: { template: "..." } }, { stepInputData: { url: "{{input.url}}" } }

Implementation Reference

  • MCP tool registration for "update_step". It accepts workflowId, stepId, and updates, then calls client.updateStep to perform the operation.
        server.tool(
            'update_step',
            `Update a single step in a workflow by step ID. Only the specified fields are merged —
    all other steps and fields remain unchanged. This is SAFER than update_workflow with steps
    because it cannot accidentally replace or delete other steps.
    
    Use this instead of update_workflow when you only need to change one step (e.g., update a prompt,
    change inputs, modify entry conditions). Deep-merges nested objects like pipelineStepPrompt,
    stepInputData, and entryConditions.
    
    For live workflows, changes are routed to a draft snapshot (same behavior as update_workflow).`,
            {
                workflowId: z.string().describe('The workflow ID'),
                stepId: z.string().describe('The step ID to update (e.g., "analyze", "scrape-company")'),
                updates: z.record(z.string(), z.any()).describe('Partial step updates to merge. Examples: { name: "New Name" }, { pipelineStepPrompt: { template: "..." } }, { stepInputData: { url: "{{input.url}}" } }'),
            },
            async ({ workflowId, stepId, updates }, extra) => {
                const client = clientFactory(extra);
                const result = await client.updateStep(workflowId, stepId, updates);
                return {
                    content: [{
                        type: 'text' as const,
                        text: JSON.stringify(result, null, 2),
                    }],
                };
            }
  • The underlying client implementation that sends the PATCH request to the API to update a workflow step.
    async updateStep(workflowId: string, stepId: string, updates: Record<string, any>) {
        return this.request(`/workflows/${workflowId}/steps/${stepId}`, {
            method: 'PATCH',
            body: JSON.stringify({ updates }),
        });
    }

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