Skip to main content
Glama

Capture baseline

capture_baseline

Fingerprint each element a locator matches while tests pass, saving baselines to .qa-mcp/baselines.json so broken locators can be healed and found again later.

Instructions

While tests pass, fingerprint the element each locator matches (.qa-mcp/baselines.json) so healing can find it later.

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

Input Schema

NameRequiredDescriptionDefault
urlYes
sessionNoOptional: reach a page behind a login or several steps into a flow
locatorsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the write side effect and the exact output file, which is valuable. It omits what happens if a locator matches nothing or multiple elements, and whether existing baseline entries are overwritten or merged.

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?

One compact sentence with zero waste, front-loading the precondition before the action and the destination file. It is slightly too compressed, since 'while tests pass' reads ambiguously and could have been phrased more plainly.

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

Completeness3/5

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

For a 3-parameter tool with no annotations and no output schema, the definition covers the core action and the artifact it writes but leaves the mutation semantics and failure behavior unaddressed. It is callable from this description, but an agent could be surprised by baseline overwrites or unmatched locators.

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 only 33%: the top-level 'url' and 'locators' fields have no schema descriptions. The description clarifies that locators are expected to match elements but says nothing about the url parameter or the accepted locator syntax, so it does not compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb ('fingerprint') and resource ('the element each locator matches') plus the persistence target '.qa-mcp/baselines.json', so an agent knows exactly what the tool produces. It does not explicitly contrast itself with siblings such as check_locator or heal_locator, which keeps it from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'While tests pass' implies the precondition (capture only during green runs) and 'so healing can find it later' implies the ordering relative to heal_locator. However, no alternative is named and no when-not condition is stated, leaving the agent to infer the workflow.

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