Skip to main content
Glama

attention.analyze

Read-only

Predict visual attention on a saved PNG screenshot to find focal points, score named regions, and generate a heatmap overlay for UI review.

Instructions

Predict visual attention on a saved PNG screenshot with HotGaze. Returns focal points, optional region scores, and a heatmap overlay.

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": {
      "screenshot_id": "<screenshot_id>"
    },
    "name": "attention.analyze"
  }
}

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.
overlayNoGenerate and store the PNG overlay. Default true.
regionsNoNamed rectangles in actual PNG pixels, measured from the top left.
return_imageNoInclude the overlay as an MCP image. Default true when overlay is enabled.
screenshot_idYesPNG artifact ID from page.screenshot. Use mode:viewport for a first-glance review.

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, lowering the burden, and the description usefully names the three output types and flags region scores and the overlay as optional. It does not disclose the meaningful behavioral traits: that the deep backend downloads dependencies and weights on first use (cost/latency), and that the overlay PNG is actually generated and stored as an artifact – a side effect worth surfacing even under a readOnly hint. Partial credit above the annotation baseline, but significant gaps remain.

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?

Two tight sentences: the first states what it does, the second states what it returns. Front-loaded and waste-free. Slight deduction because the return summary is a bare list with no indication of which returns are conditional beyond the word 'optional'.

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?

With no output schema, the description does supply a return summary (focal points, region scores, heatmap overlay), and the 6 parameters are fully documented in the schema. For a single-image prediction tool, that covers enough to invoke correctly. The missing pieces – first-use model download cost and whether overlay storage produces an artifact – are meaningful but not blocking.

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 100%, so the schema already explains screenshot_id, backend enum, regions, overlay, faces, and return_image, including defaults. The description adds nothing parameter-specific beyond restating that region scores and overlays are optional. Baseline 3 applies when the schema carries the semantics.

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 and resource: 'Predict visual attention on a saved PNG screenshot with HotGaze,' plus the outputs (focal points, region scores, heatmap overlay). An agent can tell this analyzes a single screenshot rather than comparing two. It stops short of distinguishing itself from the sibling attention.compare, 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 only implied by 'on a saved PNG screenshot' – the agent must infer that a screenshot artifact must be created first (e.g., via page.screenshot) and that this is the single-image analysis path. There is no explicit when-to-use, when-not-to-use, or routing to attention.compare for comparison work. Adequate but with a clear guidance gap.

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