Skip to main content
Glama

Aria Snapshot

aria_snapshot

Capture an ARIA snapshot of a tab's interactive elements with stable indices for clicking or typing, and refresh it after DOM changes to avoid stale element references.

Instructions

ARIA tree of interactive elements w/ idx for click/type. ~50ms. Call BEFORE first interaction + after any DOM change (idx invalidates). Repeats group as [12-77] cycle×13: link('A'),link('B') (lossless — click any idx in range).

Ex: aria_snapshot('t0') → {"tree":"[0] button "Sign in"\n[1] textbox "email"\n...","count":12}

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": {
      "tab_id": "<tab_id>"
    },
    "name": "aria_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idYes
max_itemsNo
force_refreshNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well on the risky parts: latency (~50ms), idx invalidation after DOM changes, and lossless compressed repetition (any idx in range works). Gap: nothing explains what happens when the tree exceeds max_items=60 or what force_refresh actually does.

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?

Front-loaded with the core identity, then timing rules, then the grouping format, then a concrete example — no wasted sentences. The telegraphic style ('~50ms. Call BEFORE...') is dense but readable.

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?

A return-shape example is included even though an output schema exists, which is a plus, but the two optional parameters and their effects are undocumented. For a tool whose output can be truncated and whose cache can be forced, that's a meaningful hole.

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 0%, so the description must compensate and largely doesn't. Only `tab_id` is hinted at (via the example's 't0'); `max_items` (default 60) and `force_refresh` are never mentioned, leaving truncation and caching behavior undefined.

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?

States a specific resource and shape: an ARIA tree of interactive elements where each node carries an `idx` used by click/type. That functional framing implicitly separates it from screenshot, extract_text, dom_query and current_state, but no sibling is named, so differentiation is inferred rather than explicit.

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?

"Call BEFORE first interaction + after any DOM change (idx invalidates)" gives concrete triggering conditions, which is stronger than most tools in this family. It stops short of naming alternatives (e.g. dom_query or find_by_text) or saying when this is the wrong choice.

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