Skip to main content
Glama

flow-add-step

Execute an MCP tool and record its action as a step in an active flow recording. Use to capture each action during recording.

Instructions

Execute one MCP tool and record its flow step, in the flow named by name + project_root. Use when recording a flow and you want each action run and captured; the recording must already be open. A coordinate gesture-tap records as a portable tap selector step; restart-app as a launch. Returns { message, stepCount, recorded, savedTo }; recorded, not the status, says whether a step was appended. Fails with an error, recording nothing. Call recording tools, including flow-add-script, directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoTool arguments as a JSON string, e.g. '{"udid": "ABC", "x": 0.5, "y": 0.3}'. Omit for tools with no arguments.
nameYesName of the flow being recorded — the one passed to flow-start-recording.
commandYesMCP tool to execute and record, for example "gesture-tap". Do not pass a flow directive or a recording tool. Call flow-add-script directly for a requested script step.
delayMsNoMilliseconds to sleep before executing this step during replay.
project_rootYesAbsolute path to the project root of the flow being recorded — the same value passed to flow-start-recording. Together with `name` it identifies which recording this step belongs to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.25.0
    • changedInput schema / properties / command / description
      Previous value: -"MCP tool name (e.g. \"gesture-tap\", \"screenshot\", \"launch-app\") — a TOOL, not a flow directive. A flow-file directive name (\"tap\", \"launch\", \"run\", \"type\", \"await\", \"assert\", \"pinch\", \"swipe\", \"echo\", \"wait\", \"long-press\", \"scroll-to\", \"snapshot\", \"when\") is answered with guidance, and nothing runs or is recorded: most name the tool that records the directive, while \"wait\", \"long-press\", \"scroll-to\", \"snapshot\" and \"when\" have no recording tool at all and are answered with what to do instead. A recording tool (flow-add-step, flow-add-echo, flow-start-recording, flow-finish-recording) is refused the same way, each for its own reason — nesting one would erase this flow at replay, end the take, or write the step twice."New value: +"MCP tool to execute and record, for example \"gesture-tap\". Do not pass a flow directive or a recording tool. Call flow-add-script directly for a requested script step."
  2. Changed1 schema field changedv0.24.0
    • changedInput schema / properties / command / description
      Previous value: -"MCP tool name (e.g. \"gesture-tap\", \"screenshot\", \"launch-app\") — a TOOL, not a flow directive. A flow-file directive name (\"tap\", \"launch\", \"run\", \"type\", \"await\", \"assert\", \"pinch\", \"echo\", \"wait\", \"long-press\", \"scroll-to\", \"snapshot\", \"when\") is answered with guidance, and nothing runs or is recorded: most name the tool that records the directive, while \"wait\", \"long-press\", \"scroll-to\", \"snapshot\" and \"when\" have no recording tool at all and are answered with what to do instead. A recording tool (flow-add-step, flow-add-echo, flow-start-recording, flow-finish-recording) is refused the same way, each for its own reason — nesting one would erase this flow at replay, end the take, or write the step twice."New value: +"MCP tool name (e.g. \"gesture-tap\", \"screenshot\", \"launch-app\") — a TOOL, not a flow directive. A flow-file directive name (\"tap\", \"launch\", \"run\", \"type\", \"await\", \"assert\", \"pinch\", \"swipe\", \"echo\", \"wait\", \"long-press\", \"scroll-to\", \"snapshot\", \"when\") is answered with guidance, and nothing runs or is recorded: most name the tool that records the directive, while \"wait\", \"long-press\", \"scroll-to\", \"snapshot\" and \"when\" have no recording tool at all and are answered with what to do instead. A recording tool (flow-add-step, flow-add-echo, flow-start-recording, flow-finish-recording) is refused the same way, each for its own reason — nesting one would erase this flow at replay, end the take, or write the step twice."
  3. Changed1 schema field changedv0.22.1
    • changedInput schema / properties / command / description
      Previous value: -"MCP tool name (e.g. \"gesture-tap\", \"screenshot\", \"launch-app\")"New value: +"MCP tool name (e.g. \"gesture-tap\", \"screenshot\", \"launch-app\") — a TOOL, not a flow directive. A flow-file directive name (\"tap\", \"launch\", \"run\", \"type\", \"await\", \"assert\", \"pinch\", \"echo\", \"wait\", \"long-press\", \"scroll-to\", \"snapshot\", \"when\") is answered with guidance, and nothing runs or is recorded: most name the tool that records the directive, while \"wait\", \"long-press\", \"scroll-to\", \"snapshot\" and \"when\" have no recording tool at all and are answered with what to do instead. A recording tool (flow-add-step, flow-add-echo, flow-start-recording, flow-finish-recording) is refused the same way, each for its own reason — nesting one would erase this flow at replay, end the take, or write the step twice."
  4. Changed4 schema fields changedv0.20.0
    • changedInput schema / properties / command / description
      Previous value: -"MCP tool name (e.g. \"tap\", \"screenshot\", \"launch-app\")"New value: +"MCP tool name (e.g. \"gesture-tap\", \"screenshot\", \"launch-app\")"
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Name of the flow being recorded — the one passed to flow-start-recording.",
      +  "type": "string"
      +}
    • addedInput schema / properties / project_root
      Added value: +{
      +  "description": "Absolute path to the project root of the flow being recorded — the same value passed to flow-start-recording. Together with `name` it identifies which recording this step belongs to.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "command"
      -]New value: +[
      +  "name",
      +  "project_root",
      +  "command"
      +]
  5. First observedv0.15.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It covers prerequisite state, special mapping of `gesture-tap` and `restart-app`, the exact return shape, the semantic meaning of `recorded`, and the failure mode of failing with an error and recording nothing.

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?

The main purpose and usage context are front-loaded, and every sentence adds operational information. The passage is slightly dense with edge-case details, but nothing is extraneous or redundant with the schema.

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

Completeness5/5

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

For a recording mutation with no annotations and no output schema, this description covers prerequisites, command constraints, return semantics, and error behavior. An agent has enough information to invoke the tool correctly and interpret the result without additional inference.

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 parameters are already documented well. The description adds value by clarifying how `name` and `project_root` jointly identify the recording, restricting `command` to executable MCP tools rather than flow directives or recording tools, and providing an example JSON string for `args`.

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 action: execute one MCP tool and record it as a flow step. It identifies the unique resource as the flow named by `name` + `project_root`, and distinguishes itself from the recording-tool siblings by telling agents to call `flow-add-script` directly.

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 use case: when recording a flow and each action should be executed and captured. It notes the prerequisite that recording must already be open, and names the alternative path for script steps via `flow-add-script` while warning against passing recording tools as the `command`.

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