Skip to main content
Glama

Create orchestration

create_orchestration

Create a complete orchestration workflow in ONE call. Returns the saved orchestration with its id. Prefer create_orchestration_skeleton + add_steps for plans with more than 3 steps — splitting the build avoids giant tool-call payloads. Use this single-shot form only for trivial orchestrations (≤3 steps). 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": {
      "name": "<name>",
      "steps_json": "<steps_json>",
      "entry_step_id": "<entry_step_id>"
    },
    "name": "create_orchestration"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
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"}]'
descriptionNo
max_run_usdNoThe most one run of this workflow may spend on models, in US dollars (0.5 is fifty cents). A run that has spent it stops before its next step and says so. Set a cap only when the person asks for one; 0 removes it.
entry_step_idYesID of the first step to execute
max_run_creditsNoCloud only: the most execution credits one run of this workflow may use, 1 or more. A run that reaches it stops before its next step and says so. Set a cap only when the person asks for one; 0 removes it.
max_total_turnsNoGlobal turn limit (default 100)
timeout_minutesNoOverall timeout (default 30)
state_schema_jsonNoJSON-encoded state-schema object mapping each state key to {type, default, description}. Allowed types: str, int, float, bool, list, dict. Example: '{"user_input":{"type":"str","default":"","description":"Initial user message"}}'. Pass '{}' (empty object JSON) when the orchestration has no upfront state keys.

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

A4.6/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent write, so the bar is lower. The description adds real value beyond that: it says the saved orchestration is returned with its id, and it discloses a practical behavioral constraint (payload size driving the split-build recommendation). It does not mention permissions or what happens on name collisions, keeping it short of a 5.

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?

Four short sentences, front-loaded with the action and the return value, then the routing rule, then the encoding note. No filler and no repetition of the title.

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

Completeness4/5

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

For a 9-parameter write tool with no output schema, the description covers the return value, the build strategy, and the encoding format, while the schema handles the per-parameter detail. What remains unstated — auth requirements and error behavior on invalid step graphs — is minor for a create call, but not nothing.

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 78% and the schema itself is unusually rich — steps_json carries a worked example, sub-structure encoding rules, and guidance on lean step fields; max_run_usd and state_schema_json explain units and empty-object conventions. The description's only parameter-level contribution is restating that steps are a JSON-encoded string, which the schema already says, so it adds little but also does not mislead. Baseline-plus given the near-complete schema.

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?

States a specific verb and resource ('Create a complete orchestration workflow in ONE call') and immediately names the alternative path (create_orchestration_skeleton + add_steps). An agent can distinguish this single-shot form from the incremental builders without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit decision rule with a threshold: use this only for trivial orchestrations of ≤3 steps, otherwise prefer the skeleton + add_steps pair. Both the when and the when-not are stated, along with the reason (avoiding giant tool-call payloads).

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.