Skip to main content
Glama

Add a step to a workflow

add_step
Idempotent

Add one step: a step_type (get_step_type for its settings) or an app action (app_action from search_actions, with settings.integration_arguments from get_action_schema). Without placement it goes just before End; in a workflow with conditions or loops pass placement. A prompt step needs messages. An agent step takes settings.agent_id (a saved agent) or new_agent (an agent kept on the step, not added to the agents library). The change is saved as a version: the answer's undo.version_id restores the steps from before it. Check problems in the answer before running.

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": {
      "workflow_id": "<workflow_id>"
    },
    "name": "add_step"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
messagesNoPrompt steps only: system message, user message, then a user message of labelled placeholders.
settingsNoField names and values from get_step_type (for an app action: integration_arguments, and integration_authorization_id when the app has more than one connected account).
new_agentNoAgent steps only: the agent this step uses, kept on the step and not saved in the agents library (use this for an agent only this workflow needs; use settings.agent_id for an existing agent from search_agents, not both). Hosted research tools only (enabled_mcp_tools); an agent that needs a connected app, knowledge base or sub-agent must be a saved agent. The person can save it as a real agent later with Edit agent in the editor.
placementNoWhere it goes, relative to step_id: after_step, condition_true or condition_false (first in that branch), after_condition, iteration_body (inside the loop), after_iteration.
step_typeNoFrom list_step_types. Leave out for an app action.
app_actionNoAn action slug from search_actions, e.g. "SLACK_SEND_MESSAGE".
workflow_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / new_agent
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Agent steps only: the agent this step uses, kept on the step and not saved in the agents library (use this for an agent only this workflow needs; use settings.agent_id for an existing agent from search_agents, not both). Hosted research tools only (enabled_mcp_tools); an agent that needs a connected app, knowledge base or sub-agent must be a saved agent. The person can save it as a real agent later with Edit agent in the editor.",
      +  "properties": {
      +    "description": {
      +      "type": "string"
      +    },
      +    "enabled_mcp_tools": {
      +      "description": "Hosted research tool keys, e.g. perplexity_search_api, gpt_search, anthropic_web_search, google_search, dataforseo.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "instruction_prompt": {
      +      "type": "string"
      +    },
      +    "llm_model": {
      +      "description": "From list_models.",
      +      "type": "string"
      +    },
      +    "max_token": {
      +      "minimum": 4000,
      +      "type": "integer"
      +    },
      +    "max_tool_calls": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "reasoning_effort": {
      +      "type": "string"
      +    },
      +    "temperature": {
      +      "type": "number"
      +    },
      +    "tool_choice": {
      +      "enum": [
      +        "none",
      +        "auto",
      +        "required"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "instruction_prompt",
      +    "llm_model"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare the mutation surface (readOnlyHint=false, destructiveHint=false), so the description's job is the extra context, and it delivers: the change is versioned and reversible via the answer's undo.version_id, and the answer surfaces problems to check before running. It doesn't cover permissions/ownership requirements or whether limits exist on step count, keeping it below 5.

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?

Front-loaded with the core action and the two variants; every sentence carries information about a distinct requirement. It is densely parenthetical, which makes it slightly harder to scan than an ideal bulleted form, but there is no filler.

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 an 8-parameter tool with nested objects and no output schema, the definition covers the key decision points, the undocumented nested behaviors, and the undo/validation feedback loop. It stops short of describing the full response payload beyond 'undo' and 'problems', but nothing essential for calling it correctly is missing.

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

Parameters5/5

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

With 75% schema coverage the schema documents most fields, yet the description adds real meaning the schema cannot: placement's default behavior when omitted, which step kinds require messages, that agent_id refers to a saved agent while new_agent stays on the step and is limited to hosted research tools, and that integration_arguments come from get_action_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?

The description opens with a specific verb+resource ('Add one step') and immediately splits the resource into its two concrete variants (step_type vs app_action), so an agent can distinguish this from edit_step/move_step/remove_step without opening schemas.

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?

It routes the agent to the correct prerequisites (get_step_type for settings, search_actions then get_action_schema for app actions) and states the selection rule for placement ('without placement it goes just before End; in a workflow with conditions or loops pass placement') plus the agent_id vs new_agent decision. Exclusions are explicit ('not both').

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.

Resources