Add workflow step
add_workflow_stepAdd one step to the draft of an existing workflow. For a batch, use upsert_workflow_steps. Read atomic://guides/workflow-step-inputs for step-specific required fields and examples. Supply inputs for the selected stepType; empty inputs fail. Do not add steps concurrently to the same workflow. Use update_workflow_step for corrections. Save the returned step.id for testing/deletion and step.stepIndex for routing. Copy contract.stepName and contract.outputReferences exactly. GENERATE_ARTICLE already saves content: do not follow it with CREATE_CONTENT. For PROMPT_LLM, put instructions in inputs.systemMessage and conversation turns in inputs.messages; JSON output requires jsonSchema. Validate the workflow and test its steps before running it.
Changes the draft only; it does not execute the step. Use upsert_workflow_steps for several changes and validate_workflow before any test.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"inputs": {
"messages": [
{
"role": "user",
"content": "Summarize {{input.notes}}."
}
],
"systemMessage": "Summarize the evidence."
},
"stepType": "PROMPT_LLM",
"workflowId": 24
},
"name": "add_workflow_step"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputs | Yes | REQUIRED - DO NOT LEAVE EMPTY! You must provide the required fields based on stepType. For PROMPT_LLM, use {"systemMessage":"You are ...","messages":[{"role":"user","content":"Prompt text"}]}; do not put system instructions into messages. Empty inputs {} will fail! | |
| context | No | User task for usage analytics. Omit private details. | |
| position | No | Optional position coordinates for the step in the workflow editor | |
| stepType | Yes | Select the operation this step performs. GENERATE_ARTICLE saves directly in the editor. Use CREATE_CONTENT to save output from steps such as PROMPT_LLM or AGENT that do not save it themselves. | |
| llm_model | No | Exact model ID from the calling runtime. Send on every call when known. Omit if unavailable. | |
| projectId | No | Project ID from list_projects. Omit to use the configured or sole accessible project. | |
| workflowId | Yes | Pipeline definition ID from get_workflows or create_workflow. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Saved workflow step, its input and output contract, and the operation result. | |
| success | Yes | True when the tool returns normally. | |
| executionTime | No | Elapsed time, e.g. 0.12s. |