Skip to main content
Glama

Capture locator baselines

capture_baseline

Records each locator's element details per platform while tests pass, creating baselines that locator-healing tools use to recover after app changes.

Instructions

While tests pass, record what each locator's element looks like (accessibility id, resource id, text, hint, class) in .qa-mcp/appium-baselines.json, per platform. heal_locator and heal-ci use these after the app changes. Run it on each screen your tests use (or on screens saved from passing runs).

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": {
      "locators": "<locators>"
    },
    "name": "capture_baseline"
  }
}

Input Schema

NameRequiredDescriptionDefault
screenNo
locatorsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/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 well: it discloses the persistence target (.qa-mcp/appium-baselines.json), that baselines are recorded per platform, that tests must currently pass, and which tools read the result. It omits overwrite/merge semantics (what happens to an existing baseline for the same locator) and what occurs when a locator cannot be found, which matters for a write-side tool.

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?

Three tight sentences, front-loaded with the precondition and the action, with no filler; the attribute list is informative rather than redundant. The trailing parenthetical about screens saved from passing runs is slightly compressed and could read as cryptic on first pass.

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 a two-parameter tool with no annotations and no output schema, the description covers purpose, timing, artifact location, platform scoping, and consumers. The remaining gaps — locator input format and overwrite behavior — are meaningful but limited in scope for a simple capture operation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, and it largely does not. The 'screen' parameter's role is only obliquely implied by 'Run it on each screen', and the format of the 'locators' array (locator keys? selector strings? names matching the baseline file?) is never explained, leaving the required parameter ambiguous.

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 and object ('record what each locator's element looks like') and names the concrete attributes captured (accessibility id, resource id, text, hint, class) plus the output artifact path. It is clearly distinguished from siblings by naming heal_locator/heal-ci as downstream consumers, so an agent can tell this is a baseline-capture step, not a check or heal step.

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 precondition ('While tests pass') and a clear scope ('Run it on each screen your tests use (or on screens saved from passing runs)'), plus names the downstream tools that consume the output. It does not explicitly state when to prefer check_locator or inspect_screen instead, so it stops short of full alternative routing.

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