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
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Tool arguments as a JSON string, e.g. '{"udid": "ABC", "x": 0.5, "y": 0.3}'. Omit for tools with no arguments. | |
| name | Yes | Name of the e2e test being recorded: the one passed to e2e-start-recording. | |
| command | Yes | MCP 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. | |
| delayMs | No | Milliseconds to sleep before executing this step during replay. Minimum: 0. | |
| project_root | Yes | Absolute path to the project root of the e2e test being recorded: the same value passed to e2e-start-recording. |