Skip to main content
Glama

pilot_snapshot

Capture an accessibility tree snapshot of a web page to reveal its structure and obtain element references for automated interaction.

Instructions

Capture an accessibility tree snapshot of the page with @eN refs for element selection. Use when the user wants to see the page structure, find elements to interact with, or get refs for click/fill/hover. This is the primary way to understand what is on the page. Refs from this snapshot are used by pilot_click, pilot_fill, pilot_hover, pilot_select_option, and most other interaction tools.

Parameters:

  • selector: CSS selector to scope the snapshot to a specific subtree (e.g., "#main-content")

  • interactive_only: Set to true to show only interactive elements (buttons, links, inputs) — saves tokens on large pages

  • compact: Set to true to remove empty structural nodes from the tree

  • depth: Limit the tree depth (0 = root only). Useful for reducing token usage on deeply nested pages

  • include_cursor_interactive: Set to true to scan for elements with cursor:pointer, onclick, or tabindex that are not in the ARIA tree — returns @cN refs

  • max_elements: Maximum elements to include before truncating (saves tokens on very large pages)

  • structure_only: Set to true to show tree structure without text content — saves tokens when you only need the element hierarchy

  • output_file: Set to true to save the snapshot to a temp file instead of returning inline. Returns the file path — read with the Read tool when needed. Useful when the snapshot is large and you only need it on demand.

Returns: Text representation of the accessibility tree with @eN refs (and @cN refs if include_cursor_interactive is true). If output_file=true: returns only the file path (e.g. /tmp/pilot-snap-abc123.txt).

Errors:

  • Timeout: The page is too complex or unresponsive. Try scoping with selector or using max_elements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNoCSS selector to scope the snapshot
interactive_onlyNoOnly show interactive elements (buttons, links, inputs)
compactNoRemove empty structural nodes
depthNoLimit tree depth (0 = root only)
include_cursor_interactiveNoScan for cursor:pointer/onclick/tabindex elements not in ARIA tree
max_elementsNoMax elements to include before truncating (saves tokens on large pages)
structure_onlyNoShow tree structure without text content — saves tokens
leanNoStrip structural noise (empty rows/cells, separator text, duplicate labels). Default: true. Set false for raw ARIA tree.
verboseNoAlias for lean=false. Returns full ARIA tree with all structural nodes.
output_fileNoSave snapshot to a temp file and return only the file path. Read with the Read tool when needed.
Behavior4/5

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

With no annotations, the description fully explains behavior: captures tree, returns refs, mentions timeout errors, output file option. No contradictions. Discloses read-only nature implicitly.

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?

Well-structured with purpose, usage, parameters, returns, errors. Front-loaded key info. Slightly lengthy due to detailed parameter explanations, but justified for 10 parameters.

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?

Comprehensive for tool with 10 parameters and no output schema: covers usage, parameters, return format, errors, relationship to siblings. Could mention performance but sufficient.

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 100%, but description adds value by explaining purpose and token-saving tips for each parameter (e.g., interactive_only, compact, depth). Exceeds baseline.

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?

The description clearly states the tool captures an accessibility tree snapshot with @eN refs for element selection. It distinguishes itself as the primary method to understand page structure and source for interaction tool refs.

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?

Clearly indicates when to use: for seeing structure, finding elements, getting refs. Described as primary way to understand the page. Does not explicitly exclude alternatives but provides strong context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TacosyHorchata/Pilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server