Skip to main content
Glama

Visual assert / baseline / diff / find text / find image

qa_visual

Verify UI areas that the accessibility tree can't see—maps, canvases, or iOS screens—by asserting, baseline-diffing, or finding text and images via screenshots, with optional tap to act on matches.

Instructions

Screenshot checks where the UI tree fails (maps, canvases, WDA-less iOS). mode: assert, baseline (.swipium/baselines/.png), diff, find_text (OCR, consent-gated), find_image. Finds return device coordinates + coordinateSpace; tap:true taps it (recorded + budgeted). Password/OTP screens need force:true; unverified credential screens: assert/diff not saved. Details: docs/tools.md#qa_visual.

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": {
      "sessionId": "<sessionId>",
      "mode": "<mode>"
    },
    "name": "qa_visual"
  }
}

Input Schema

NameRequiredDescriptionDefault
tapNofind_text/find_image: tap the found point.
modeYes
nameNobaseline/diff: baseline name, [A-Za-z0-9._-]{1,64}.
passNoassert: default true; false if the expected result is NOT visible.
forceNoCapture even if a secure field may be visible.
queryNofind_text: text to find.
reasonNoassert: extra detail.
approveNo
minScoreNofind_image: min match score 0..1 (default 0.85).
templateNofind_image: project PNG or swipium:// URI.
assertionNoassert: what you visually confirmed.
consentIdNo
sessionIdYes
thresholdNodiff: max changed fraction to pass (default 0.02).
minConfidenceNofind_text: min OCR confidence 0..1 (default 0.8).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, and the description adds real operational context: baselines are written to .swipium/baselines/<name>.png, OCR is consent-gated, tap:true causes a recorded and budgeted tap, and credential screens require force:true. However it does not state what an assert/diff call returns or how failures are reported, so the behavioral picture is useful but incomplete.

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?

Tight and front-loaded: the core distinction comes first, then modes, then safety rules, then a doc pointer. The telegraphic phrasing ('WDA-less iOS', 'unverified credential screens') is efficient but occasionally under-explained, which costs a point.

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 15-parameter tool with no output schema, the description covers mode selection, filesystem side effects, consent gating, and safety rules, and it points to docs/tools.md#qa_visual for depth. The main gap is what an assert or diff call yields when it fails, which an agent would need before relying on results.

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?

With 73% schema description coverage the schema already explains most parameters (name pattern, threshold default, minScore, minConfidence). The description adds meaning to a few, notably the baseline file path and the force/tap side effects. approve, consentId, sessionId, and assertion carry no explanation here beyond their schema entries.

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 the specific resource and the exact niche: 'Screenshot checks where the UI tree fails (maps, canvases, WDA-less iOS)', then enumerates all five modes (assert, baseline, diff, find_text, find_image). An agent can immediately tell this apart from tree-based siblings like qa_inspect 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 opening clause gives an explicit when-to-use condition (when the UI tree is unreliable) and per-mode guidance follows, including when force:true is required and when assert/diff results are not persisted. It stops short of naming the specific alternative tools to use when the UI tree does work, leaving that routing implicit.

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