Skip to main content
Glama

get-element-snapshot

Reads the accessibility snapshot of a single page element to inspect its role, name, and state; use page snapshots for actionable references.

Instructions

Read the accessibility snapshot of one element. Use get-page-snapshot for actionable references.

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": {
      "pageId": "<pageId>",
      "selector": "<selector>"
    },
    "name": "get-element-snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdYes
selectorYes
sessionIdNoBrowser session ID. Defaults to 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/5.0
Behavior2/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, and "Read" is the only behavioral signal it offers. It says nothing about whether the returned snapshot is tied to the latest page snapshot, whether stale snapshotIds error out, what the response shape is, or how failures surface.

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 with zero waste; the core purpose is front-loaded and the disambiguation follows immediately. Nothing is padded or repeated from the name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool takes three parameters including a nested oneOf selector union and has no output schema, so the description must explain both selection mechanics and return content. It covers neither, leaving the agent to infer how to address an element and what a snapshot contains.

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 only 33%, so the description should compensate for the undocumented pageId, selector, and sessionId. It adds a marginal hint by tying "actionable references" to get-page-snapshot, which indirectly explains the ref/snapshotId selector variant, but it says nothing about the label or role selector forms or the session default.

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?

"Read the accessibility snapshot of one element" gives a specific verb plus resource and scopes it to a single element, which distinguishes it from the page-wide sibling. It stops short of saying how the result differs from get-element-info, but an agent can still tell the two apart.

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 second sentence names the alternative (get-page-snapshot) and the condition that selects it — when the agent needs actionable references rather than a read-only view. It does not state explicit exclusions against the other inspection siblings, but the routing intent is clear.

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