Skip to main content
Glama

Add steps

add_steps

Append a batch of steps to an existing orchestration. Keep batches small (≤5 steps) so each tool-call payload stays lean. Existing step ids in the orchestration are preserved — this is additive only. Duplicate step ids are rejected. Steps are passed as a JSON-encoded string.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "orch_id": "<orch_id>",
      "steps_json": "<steps_json>"
    },
    "name": "add_steps"
  }
}

Input Schema

NameRequiredDescriptionDefault
orch_idYes
steps_jsonYesJSON-encoded array of step objects. Each step is an object with {id, name, type, ...type-specific fields}. See the step-type palette in your system prompt for the full field list per type. Keep each step lean — include only fields that differ from zero-defaults. Sub-structures MUST be JSON strings inside each step: route_map_json, route_descriptions_json, parallel_branches_json, human_fields_json, switch_cases_json, output_fields_json (an llm or agent step's answer fields, F1553). Retrieve and ingest steps take add_single_step's flat retrieve_* / ingest_* fields. An agent step that should read the images a person attaches in chat sets "pass_images": true. Minimal example (2 agent steps): '[{"id":"step_abc1234","name":"Analyse","type":"agent","agent_id":"agent_123","prompt_template":"Summarise {{ state.user_input }}","input_keys":["user_input"],"output_key":"summary","next_step_id":"step_def5678"},{"id":"step_def5678","name":"Done","type":"end"}]'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / steps_json / description
      Previous value: -"JSON-encoded array of step objects. Each step is an object with {id, name, type, ...type-specific fields}. See the step-type palette in your system prompt for the full field list per type. Keep each step lean — include only fields that differ from zero-defaults.\nSub-structures MUST be JSON strings inside each step: route_map_json, route_descriptions_json, parallel_branches_json, human_fields_json, switch_cases_json. Retrieve and ingest steps take add_single_step's flat retrieve_* / ingest_* fields. An agent step that should read the images a person attaches in chat sets \"pass_images\": true.\nMinimal example (2 agent steps):\n'[{\"id\":\"step_abc1234\",\"name\":\"Analyse\",\"type\":\"agent\",\"agent_id\":\"agent_123\",\"prompt_template\":\"Summarise {{ state.user_input }}\",\"input_keys\":[\"user_input\"],\"output_key\":\"summary\",\"next_step_id\":\"step_def5678\"},{\"id\":\"step_def5678\",\"name\":\"Done\",\"type\":\"end\"}]'"New value: +"JSON-encoded array of step objects. Each step is an object with {id, name, type, ...type-specific fields}. See the step-type palette in your system prompt for the full field list per type. Keep each step lean — include only fields that differ from zero-defaults.\nSub-structures MUST be JSON strings inside each step: route_map_json, route_descriptions_json, parallel_branches_json, human_fields_json, switch_cases_json, output_fields_json (an llm or agent step's answer fields, F1553). Retrieve and ingest steps take add_single_step's flat retrieve_* / ingest_* fields. An agent step that should read the images a person attaches in chat sets \"pass_images\": true.\nMinimal example (2 agent steps):\n'[{\"id\":\"step_abc1234\",\"name\":\"Analyse\",\"type\":\"agent\",\"agent_id\":\"agent_123\",\"prompt_template\":\"Summarise {{ state.user_input }}\",\"input_keys\":[\"user_input\"],\"output_key\":\"summary\",\"next_step_id\":\"step_def5678\"},{\"id\":\"step_def5678\",\"name\":\"Done\",\"type\":\"end\"}]'"
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=false, so the safety profile is covered structurally. The description usefully adds that existing step ids are preserved and duplicate step ids are rejected, which genuinely extends beyond the annotations. It does not disclose atomicity (does one bad step reject the whole batch?), required permissions, or what the call returns.

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?

Four short sentences, front-loaded with the core action, then constraints in priority order. Minimal waste; the closing sentence about JSON encoding is close to redundant with the schema but functions as a call-site reminder.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a write tool with no output schema, the definition covers the additive contract and duplicate handling, which is the crucial part. It leaves open what is returned (created step ids, updated orchestration), whether the append is all-or-nothing, and any authorization requirements, so an agent cannot fully predict the outcome of the call.

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?

With 50% schema coverage, the steps_json parameter is heavily documented in the schema itself (structure, sub-structure strings, a worked example), and orch_id is undocumented anywhere but is self-evident. The description contributes the non-schema batch-size limit of ≤5 steps and the duplicate-id rejection rule; otherwise it largely restates that steps arrive as a JSON-encoded string.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Append a batch of steps to an existing orchestration" gives a specific verb (append), resource (steps), and target (existing orchestration), and the word "batch" implicitly separates it from the single-step sibling. It stops short of naming add_single_step or add_multiple_steps, so an agent must infer the boundary from the word "batch" alone.

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

Usage Guidelines3/5

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

Practical operating guidance is present: keep batches to ≤5 steps to keep payloads lean, and additive-only semantics. However, there is no explicit statement of when to prefer this over add_single_step or add_multiple_steps, and no exclusions or prerequisites (e.g. whether the orchestration must be in draft state). Usage is implied rather than routed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.