Skip to main content
Glama

attention.compare

Read-only

Compare predicted visual attention between two same-sized PNG screenshots, optionally scoring named pixel regions to identify where baseline and candidate differ.

Instructions

Compare predicted attention on two same-sized PNG screenshot artifacts. Regions apply to the same pixel coordinates in both screenshots.

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": {
      "baseline_id": "<baseline_id>",
      "candidate_id": "<candidate_id>"
    },
    "name": "attention.compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
facesNoEnable the optional YuNet face-attention layer. Default false.
backendNoFast UI saliency heuristic (default) or pretrained UNISAL for image-heavy screens and second estimates. Deep dependencies and weights download automatically on first use with the default uv runner.
regionsNoNamed rectangles in actual PNG pixels, measured from the top left.
baseline_idYes
candidate_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds a genuine operational constraint not in the annotations: both artifacts must be same-sized PNGs. However, it says nothing about what the comparison produces (no output schema exists to cover that gap) or about limitations such as the optional faces/backend layers affecting results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, zero filler, with the core action and the key constraint front-loaded. The second sentence carries information that is not redundant with the first.

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 read-only comparison tool with five parameters and no output schema, the description covers the input contract but not the result. An agent knows what to pass in but has no idea what form the comparison comes back in (scores, per-region deltas, images), which is a meaningful gap when no output schema documents it.

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 coverage is 60%, so the schema carries most of the burden, including detailed descriptions for faces, backend, and regions. The description adds one real semantic point beyond the schema: regions map to identical pixel coordinates in both screenshots, which clarifies how the regions array behaves in a comparison. It says nothing about how baseline_id and candidate_id are obtained or what they refer to.

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 names a specific verb ('Compare') and a specific resource ('predicted attention on two same-sized PNG screenshot artifacts'), which is enough to distinguish it from a single-image sibling like attention.analyze without opening either schema. It stops short of explicitly contrasting with that sibling, so it lands at 4 rather than 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?

Usage is implied rather than stated: an agent can infer it should call this when it has two screenshots to compare, and the 'same-sized PNG' precondition is a useful gate. There is no explicit when-not guidance and no mention of attention.analyze as the alternative for single-image analysis.

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

Deploy Server

Other Tools