Skip to main content
Glama

Heal locator

heal_locator

Finds the intended element when a locator fails or matches several elements and suggests a verified replacement with a confidence score and alternatives; never edits files.

Instructions

For a locator that no longer matches (or matches several elements), find the intended element on the screen and suggest a verified replacement with a confidence score, reasons, the runner-up and alternatives (accessibility ids preferred). screen: the page source saved when the test failed (see run_tests), or omit for the live device. Never edits files.

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": {
      "locator": "<locator>"
    },
    "name": "heal_locator"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNo
screenNo
locatorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does useful work by stating 'Never edits files', which establishes a non-mutating safety profile, and by describing what the response contains. However, it omits the fact that omitting screen hits the live device (only implied), and says nothing about device-side effects, latency, or failure modes when no confident match exists.

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 purpose and precondition are front-loaded in the first clause, followed by the return shape and then a targeted parameter note. Wording is dense but nearly every clause carries information. The one structural weakness is that the screen explanation is embedded mid-sentence rather than separated, making it slightly harder to scan.

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?

With no output schema, the description must explain returns, and it does: confidence score, reasons, runner-up, and alternatives. It covers the failure precondition, the non-mutating guarantee, and the screen-source workflow. The only residual gap is the unexplained lang parameter, which is minor for a three-parameter tool.

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 0%, so the description must compensate, and it does so well for the screen parameter: it explains the saved page source from run_tests and the omit-for-live-device behavior. The locator parameter is implicitly defined by the opening sentence. The lang parameter receives no explanation at all, leaving one of three parameters undocumented.

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?

The description gives a specific verb-and-resource pair: find the intended element and suggest a verified replacement, scoped to the exact failure condition (locator no longer matches or matches several elements). It also enumerates the return contents (confidence score, reasons, runner-up, alternatives), so an agent can tell this apart from check_locator or inspect_screen without opening the schema.

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?

The triggering condition is stated explicitly in the opening clause, which tells the agent when this tool applies. It also cross-references run_tests for the saved page source, giving a clear upstream workflow. It stops short of naming alternatives or stating when not to use it (e.g. when the locator still resolves uniquely).

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