Skip to main content
Glama

e2e-add-step

Executes a specified MCP tool and appends it as a step in an open end-to-end test recording, returning whether the step was saved.

Instructions

Execute one MCP tool and record its step in the e2e test named by name + project_root. Use when recording 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 e2e-add-script, directly.

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>",
      "project_root": "<project_root>",
      "command": "<command>"
    },
    "name": "e2e-add-step"
  }
}

Input 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 e2e test being recorded: the one passed to e2e-start-recording.
commandYesMCP tool to execute and record, for example "gesture-tap". Do not pass an e2e test directive or a recording tool. Call e2e-add-script directly for a requested script step.
delayMsNoMilliseconds to sleep before executing this step during replay. Minimum: 0.
project_rootYesAbsolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the step-record transformation ('gesture-tap' becomes a portable `tap`, 'restart-app' becomes a `launch`), the return shape { message, stepCount, recorded, savedTo }, the subtlety that `recorded` rather than status signals success, and failure semantics ('Fails with an error, 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?

Front-loads the core action, then adds prerequisite, transformation rules, and return contract in short clauses. It is denser and longer than typical but nearly every sentence contributes distinct information; the middle sentences on return semantics could be tightened slightly.

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?

There is no output schema and no annotations, so the description must cover return values and failure modes itself — and it does, naming all four returned fields and the error behavior. For a five-parameter tool that proxies arbitrary commands, this is complete enough to call correctly.

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?

Schema description coverage is 100%, so the schema already documents all five parameters including the args JSON format and delayMs semantics. The description adds only light reinforcement (that `command` is a tool name, not a directive), which is the expected baseline-3 level when the schema does the heavy lifting.

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+resource: 'Execute one MCP tool and record its step in the e2e test named by `name` + `project_root`.' It also distinguishes itself from the nearest sibling by saying recording tools, including `e2e-add-script`, should be called directly rather than routed through this tool.

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?

Gives a clear activation condition ('Use when recording and you want each action run and captured') and a prerequisite ('the recording must already be open'). It also carves out the exclusion for e2e test directives and recording tools, though it doesn't spell out what to do if no recording is open beyond failing.

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