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
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow ID | |
| stepId | Yes | The step ID to update (e.g., "analyze", "scrape-company") | |
| updates | Yes | Partial step updates to merge. Examples: { name: "New Name" }, { pipelineStepPrompt: { template: "..." } }, { stepInputData: { url: "{{input.url}}" } } |
Implementation Reference
- src/tools/workflows.ts:101-126 (handler)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), }], }; } - src/client.ts:115-120 (handler)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 }), }); }