Skip to main content
Glama

session_snapshot

Capture the current page's accessibility tree to inspect roles, names, and selectors before clicking or filling; open a profile session first.

Instructions

Take an accessibility-tree snapshot of the session's current page.

This is the primary way to see what is on a page before acting on it — read it to find the roles/names/selectors to pass to session_click_selector or session_fill_selector. Requires a session opened with profile_start first.

Args: name: identity name, exactly as profiles_list reports it.

Returns {snapshot}: the page's accessibility tree as text. Fails with a readable message if the session is not open (409 — call profile_start first) or the identity does not exist (404).

Input Schema

NameRequiredDescriptionDefault
nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.5/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: it discloses the prerequisite session state, the failure modes with concrete status codes (409 when no session, 404 when the identity does not exist), and that errors are readable rather than opaque. The remaining gap is that it says nothing about snapshot size or possible truncation of large accessibility trees, which matters for a tool that returns a whole page tree.

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 purpose, then usage, then Args, then Returns/errors — an agent can stop reading at any point and still know enough to act. Slightly redundant in restating the 409 condition both in the prerequisite line and the Returns block, but that repetition is cheap and serves the error path.

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 one-parameter read tool with no output schema, the definition covers purpose, prerequisite, return shape (accessibility tree as text), and both error paths — nearly everything needed to invoke it correctly. The only omission is guidance on payload size or what to do if the tree is very large, a minor gap against an otherwise complete entry.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single `name` property has no description, so the description must compensate — and it does, defining `name` as the identity name "exactly as profiles_list reports it," which tells the agent both the value's source and its exact-match requirement. It stops short of stating whether the name is case-sensitive or what happens on a near-miss, but the discovery pointer is the important part.

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 a specific verb and resource — take an accessibility-tree snapshot of the session's current page — and explicitly positions it as "the primary way to see what is on a page before acting." It routes the agent toward the consuming siblings (session_click_selector, session_fill_selector), so it is distinguishable from session_eval, session_tabs, and the profile_* tools without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use (read this to find roles/names/selectors before clicking or filling) and a hard prerequisite ("Requires a session opened with profile_start first"). It also names the specific consumers of the output, which is exactly the alternative-routing an agent needs.

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