Skip to main content
Glama

Add single step

add_single_step

Add ONE step to an orchestration using flat parameters — no JSON encoding needed for most fields. Only route_map_json, route_descriptions_json, parallel_branches_json, and human_fields_json are JSON strings. Preferred over add_steps for reliability.

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>",
      "step_id": "<step_id>",
      "name": "<name>",
      "type": "<type>"
    },
    "name": "add_single_step"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable step name
typeYesStep type
modelNoLLM model override for this step
on_missNoWhen a page no longer matches a step: 'pause' (the default) gives the person the wheel; 'agent' has the step's agent_id, a Browser agent, find the way (browser steps). Either way the new path waits as a fix for a person to approve.
orch_idYesOrchestration ID from create_orchestration_skeleton
step_idYesUnique step ID (step_ + 7 alphanumeric chars)
agent_idNoAgent ID (required for agent/tool steps; on a browser step with on_miss 'agent', a Browser agent)
loop_overNoExpression over shared state yielding a list, e.g. `state.tickets` (loop steps). When set, the loop runs once per item instead of loop_count. Same restricted expression syntax as if_condition; filter a list in a transform step and loop over what it writes.
max_turnsNoMax agent turns (default 15)
input_keysNoState keys this step reads
loop_countNoNumber of loop iterations (fixed-count loops)
output_keyNoState key this step writes to
forced_toolNoTool name for tool steps
pass_imagesNoAgent steps only: Sees attachments. The images a person attaches in chat reach this step's model (pick one that can read images). A step that runs another workflow passes them on to it. Off by default; chat offers Attach only when a step has it.
workflow_idNoThe id of the workflow a workflow step runs, as a nested run (workflow steps)
human_promptNoPrompt shown to user (human steps)
if_conditionNoCondition for if_else steps, evaluated against shared state. Use dot-notation: e.g. `state.result.flag == True` or `state.score > 5`. Missing keys are treated as None. Restricted Python over `state`. An expression reads `state` with dots, compares and combines values, and may call abs, all, any, bool, dict, enumerate, float, int, len, list, max, min, reversed, round, sorted, str, sum; and the methods on text: .capitalize, .casefold, .count, .endswith, .find, .index, .isalnum, .isalpha, .isdigit, .islower, .isnumeric, .isspace, .isupper, .join, .lower, .lstrip, .partition, .removeprefix, .removesuffix, .replace, .rfind, .rindex, .rpartition, .rsplit, .rstrip, .split, .splitlines, .startswith, .strip, .title, .upper; on a dict: .get, .items, .keys, .values; on a list: .count, .index; on a tuple: .count, .index. No f-strings, comprehensions or lambdas.
ingest_kb_idNoKnowledge base id the records are added to, from list_knowledge_bases (ingest steps)
next_step_idNoNext step ID. NOT used for evaluator/if_else/switch steps. REQUIRED on a parallel step, where it is the join and must name a merge step.
recording_idNoThe recording a browser step replays by code, from list_recordings (browser steps; required). Recordings are made by a person in the app, never by the builder.
loop_item_keyNoState key each for-each item is written to (default `loop_item`)
loop_step_idsNoStep IDs in loop body (loop steps)
print_contentNoMarkdown or plain text to store in output_key (print steps). Use {{ state.key }} or {{ state.key.nested }} to embed shared state values.
loop_index_keyNoState key each iteration's 0-based index is written to, in every loop mode (default `loop_index`)
max_iterationsNoHow many times this step may run in one run (default 3). A route to it after that fails the run, unless on_exhausted_step_id names where to go. Raise it for a cycle a person drives (a revision or clarification loop).
may_send_stepsNoIds of the recording's steps that may send on their own (get_recording lists them). A run is never watched: any other send pauses it for the person. Default none (browser steps).
merge_strategyNoHow to combine inputs (merge steps)
retrieve_queryNoWhat to search for, with {{ state.key }} placeholders, e.g. `{{ state.question }}` (retrieve steps)
retrieve_top_kNoHow many passages, 1-50; unset: the knowledge base's own (retrieve steps)
route_map_jsonNoJSON string mapping route labels to step IDs. Example: '{"approved":"step_abc","rejected":"step_def"}'
transform_codeNoPython code: reads `state`, assigns `result` (transform steps)
if_true_step_idNoStep to go to when if_condition is True (if_else steps)
ingest_id_fieldNoField naming each record, e.g. `ticket_id`: the same id replaces its record. Unset: an id from the record's content (ingest steps)
prompt_templateNoPrompt with {{ state.key }} placeholders (for agent/llm steps)
retrieve_kb_idsNoKnowledge base ids to search, from list_knowledge_bases (retrieve steps; at most 10)
retrieve_rerankNoRerank on or off; unset: the knowledge base's default (retrieve steps)
timeout_secondsNoStep timeout (default 300). An agent step whose agent runs a workflow waits on that workflow's own timeout_minutes at the default; set another value to cap it
browser_sessionsNoKept sessions the step's browser starts signed in with: ids from list_browser_sessions, or a site (e.g. 'portal.example.com') for the person's own session there. One per site; only the person's own or shared with them. Signing in is the person's, in Sessions.
evaluator_promptNoRouting instructions for evaluator steps
if_false_step_idNoStep to go to when if_condition is False (if_else steps)
human_fields_jsonNoJSON string of field definitions. The answer is stored under output_key as a mapping {field name: value}: name the output_key for the step (e.g. `review`), not after a field, type it dict, and read one field as `{{ state.review.feedback }}`. Types: string, textarea, number, boolean, email, date, phone, choice (a dropdown; give it "options": [..], one is picked). Example: '[{"name":"feedback","type":"textarea","label":"Your feedback"},{"name":"decision","type":"choice","label":"Decision","options":["Approve","Later"]}]'
ingest_text_fieldNoField holding the text to index; unset: the whole object is indexed as JSON (ingest steps)
retrieve_snapshotNo"active" (default), or a ksnap_… id to pin ONE knowledge base's index version (retrieve steps)
switch_cases_jsonNoJSON string mapping string values to step IDs (switch steps). Example: '{"approved":"step_abc","rejected":"step_def"}'. Unmatched values fall through to switch_default_step_id.
switch_expressionNoExpression whose str() result is matched against switch_cases (switch steps). Example: `state.category` or `state.result.status.lower()`. Restricted Python over `state`. An expression reads `state` with dots, compares and combines values, and may call abs, all, any, bool, dict, enumerate, float, int, len, list, max, min, reversed, round, sorted, str, sum; and the methods on text: .capitalize, .casefold, .count, .endswith, .find, .index, .isalnum, .isalpha, .isdigit, .islower, .isnumeric, .isspace, .isupper, .join, .lower, .lstrip, .partition, .removeprefix, .removesuffix, .replace, .rfind, .rindex, .rpartition, .rsplit, .rstrip, .split, .splitlines, .startswith, .strip, .title, .upper; on a dict: .get, .items, .keys, .values; on a list: .count, .index; on a tuple: .count, .index. No f-strings, comprehensions or lambdas.
output_fields_jsonNoJSON string of the fields an llm or agent step answers (F1553): the step answers that one object, which the run holds its model to (asked once more, then the step fails), and a later step reads one as `state.<output_key>.<name>`. Types: text, number, boolean (a yes or no), choice (give it "options": [..]), list (of text). Example: '[{"name":"risky","type":"boolean","description":"Whether the change is risky"},{"name":"fit","type":"choice","options":["good","poor"]}]'
ingest_records_fromNoState key holding the list of objects to add, e.g. `tickets` (ingest steps)
loop_max_iterationsNoHard ceiling on iterations for any loop mode (default 50)
include_full_historyNoFor agent/llm/tool steps: controls revision-history rendering on re-runs. Default (unset) auto-enables full history whenever this step runs more than once. Set false to force last-attempt only (smaller prompt); set true is equivalent to default. Only relevant if you want to explicitly opt OUT of full history.
loop_break_conditionNoCondition evaluated after each iteration; True stops the loop (loop steps). Same restricted expression syntax as if_condition.
loop_while_conditionNoCondition re-evaluated before each iteration, e.g. `(state.n or 0) < 5` (loop steps). Same restricted expression syntax as if_condition.
on_exhausted_step_idNoStep the run goes to when a route reaches this step after it has run max_iterations times, e.g. an escalation or a best-effort finish. Unset, the run fails with "'<step>' gave up after N attempts".
recording_inputs_jsonNoJSON object filling each of the recording's inputs (get_recording names them), each a value or a {{ state.key }} template. Example: '{"order number":"{{ state.user_input }}"}' (browser steps; every input filled).
retrieve_filters_jsonNoOptional JSON metadata filter (retrieve steps), e.g. '{"doc_type":"contract","year":{"$gte":2024}}'. Operators: $eq $ne $in $nin $gt $gte $lt $lte, combined with $and $or $not
ingest_metadata_fieldsNoFields copied into each record's metadata, so retrieve steps can filter on them (ingest steps)
parallel_branches_jsonNoJSON string of branch arrays. Example: '[["step_a"],["step_b"]]'
switch_default_step_idNoFallback step when no switch case matches
route_descriptions_jsonNoJSON string mapping route labels to descriptions. Example: '{"approved":"Ready to go","rejected":"Needs work"}'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / output_fields_json
      Added value: +{
      +  "description": "JSON string of the fields an llm or agent step answers (F1553): the step answers that one object, which the run holds its model to (asked once more, then the step fails), and a later step reads one as `state.<output_key>.<name>`. Types: text, number, boolean (a yes or no), choice (give it \"options\": [..]), list (of text). Example: '[{\"name\":\"risky\",\"type\":\"boolean\",\"description\":\"Whether the change is risky\"},{\"name\":\"fit\",\"type\":\"choice\",\"options\":[\"good\",\"poor\"]}]'",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false), so the safety story is covered elsewhere. The description adds a useful implementation note that most fields take plain values while four specific fields require JSON strings. It does not state what is returned, whether the edit is reversible, or what happens when orch_id/step_id are invalid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with no filler: the scope constraint and encoding note come first, the sibling preference second. Every clause carries information the agent needs before calling.

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 58-parameter mutation with no output schema, the description is adequate but thin. It never says what the call returns (a step id worth reusing?) or how this fits into the skeleton-then-steps build sequence implied by orch_id. The heavy schema documentation compensates for parameter gaps, but the workflow-positioning gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description earns an extra point by carving out the JSON-string subset (route_map_json, route_descriptions_json, parallel_branches_json, human_fields_json) among 58 parameters — a distinction that is easy to miss when scanning the schema. That is real meaning added beyond the structured fields rather than a restatement.

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

Purpose5/5

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

"Add ONE step to an orchestration" names a specific verb and resource, and the scope word ONE plus the mention of flat parameters makes it immediately distinguishable from add_steps. The description also states the preferred relation to the sibling, so an agent can choose without opening either schema.

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

Usage Guidelines4/5

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

It explicitly routes the agent: "Preferred over add_steps for reliability." That is a clear when-to-use signal with a stated reason. It stops short of naming a when-not-to-use case (e.g. bulk creation, where add_steps or add_multiple_steps would be the choice), so it falls just short of a 5.

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.