Skip to main content
Glama

e2e-start-recording

Start recording a new end-to-end test by resetting its YAML file to an empty sequence, then capture reusable device interactions as steps for later replay.

Instructions

Start recording a new e2e test, resetting .argent/e2e/.yaml to an empty e2e test and replacing any existing one. Use when you want to capture a reusable sequence of device interactions for later replay. Load the argent-create-e2e skill first: it holds the polish, audit and replay steps. Not for Apple TV or Android TV. Returns { message, e2eTestFile, savedTo } and optionally { restarted, discardedSteps } if a live recording of the same e2e test was discarded. Without a link, it creates that file and fails if the .argent/e2e/ directory cannot be created or the file cannot be written. Over a link (argent link or ARGENT_TOOLS_URL, also to 127.0.0.1), your client writes the file, and savedTo is its path on your computer, or null when that write failed.

Several e2e tests can be recorded at once, each keyed by the name + project_root that every subsequent recording tool repeats, and one recording's steps never land in another's file.

After starting, use e2e-add-step to append tool calls. Each step runs LIVE, so give each concurrent recording its own device and pick a name unique to your task. Read each step's message: it warns when a recorded await-ui-element did not hold, or may fail once converted to await:/assert:. A wait nested in a recorded run-sequence gets no such warning, so read its toolResult. For a standalone e2e test, record a restart-app of the app under test as the FIRST step (captured as the e2e test's launch step); for a reusable fragment, skip that and pass executionPrerequisite instead. Starting over an existing e2e test replaces the whole file, including its requires: block; pass requires to keep it. Use e2e-add-echo to add labels, and e2e-add-script to run a local .mjs, .mts, .js or .ts file and record it as a script: step. Call e2e-finish-recording when done.

To remove or reorder steps, edit the .yaml file after e2e-finish-recording, not during the recording: over a link, the next recorded step writes over your edit, and without a link, an edit that renumbers the steps drops their warnings.

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>"
    },
    "name": "e2e-start-recording"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesName for this e2e test (e.g. "settings-explore"): letters, digits, underscore and hyphen only.
requiresNoThe e2e test's `requires:` block: the targets it supports, ANDed. `platform` is one platform or a list (`ios` also covers a remote simulator); `runtimeKind` is `tv` or `mobile`. Omit it for a test that runs on any target.
project_rootYesAbsolute path to the project root directory (the directory that contains or should contain `.argent/e2e/`).
executionPrerequisiteNoFragments only: the app/device state assumed on entry (e.g. "Settings app open on General page"). Omit it for a standalone e2e test. restart-app has no chromium support, so a chromium e2e test records as a fragment; add the `launch: { chromium: <app path> }` line to the YAML afterward, deleting the executionPrerequisite line if you passed one, since an e2e test that starts with a launch must not declare it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/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: it discloses that starting over an existing test replaces the whole file including its `requires:` block, the two failure modes (directory cannot be created / file cannot be written), link-vs-local write behavior with `savedTo` null on failure, concurrent recordings keyed by name+project_root, and that each step runs LIVE so devices must not be shared.

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 core action and its destructive effect are front-loaded in the first sentence, and nearly every sentence carries operational information. It is long, and the trailing guidance about editing/reordering the .yaml after finishing belongs more to e2e-finish-recording, which slightly dilutes focus.

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 complex, stateful, file-mutating tool with nested parameters and no output schema, the description covers the return shape ({ message, e2eTestFile, savedTo } plus optional restarted/discardedSteps), concurrency semantics, warning interpretation, and the full record-then-finish workflow. Nothing needed to call it correctly is missing.

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 schema already documents all four parameters and the baseline is 3. The description still adds real meaning beyond it: pass `requires` to avoid losing the block on replacement, name must be unique to avoid cross-contamination between concurrent recordings, and executionPrerequisite applies only to fragments (with the chromium restart-app workaround).

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?

Opens with a specific verb and resource ("Start recording a new e2e test") and immediately names the concrete effect — resetting `.argent/e2e/<name>.yaml` to an empty e2e test and replacing any existing one. It is clearly distinguishable from the siblings it names (e2e-add-step, e2e-finish-recording, e2e-add-echo, e2e-add-script).

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 explicit when-to-use ("capture a reusable sequence of device interactions for later replay"), a prerequisite (load the argent-create-e2e skill first), and an explicit exclusion ("Not for Apple TV or Android TV"). It also routes the agent through the follow-on tools and states the standalone-vs-fragment branching rule.

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