Skip to main content
Glama

desktop_snapshot

Capture a desktop accessibility tree as structured JSON with @ref IDs to inspect windows and UI elements for automation or verification.

Instructions

agent-desktop snapshot: Capture accessibility tree as structured JSON with @ref IDs

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "desktop_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
appNoFilter to application by name
rootNoStart traversal from this ref instead of window root
compactNoCollapse single-child unnamed nodes to reduce tree depth
surfaceNoSurface to snapshotwindow
skeletonNoShallow overview with children_count on truncated containers
max_depthNoMaximum tree depth (default 10)
window_idNoScope to a single window ID (from list-windows)
timeout_msNoObservation deadline in milliseconds (default 3000; raise for slow Chromium settles)
include_boundsNoInclude element bounds (x, y, width, height)
interactive_onlyNoInclude interactive elements only
force_electron_a11yNoAssume Chromium renderer accessibility is forced (skips activation guidance)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses the return payload shape (structured JSON with @ref IDs), which is the key behavioral fact for chaining into action tools, but it says nothing about read-only semantics, truncation behavior on large trees, or the side effect implied by force_electron_a11y.

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?

A single front-loaded sentence with no filler, and the return format is stated immediately. The 'agent-desktop snapshot:' prefix duplicates the tool name and title and could be dropped without loss.

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?

For an 11-parameter observation tool with no annotations and no output schema, one sentence is thin. An agent gets no signal about whether the call mutates state (force_electron_a11y can trigger Chromium accessibility activation), how large or truncated output behaves, or how the snapshot relates to the follow-up action tools.

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 all 11 parameters are already documented in structured form, which sets the baseline at 3. The description adds the '@ref IDs' concept that gives meaning to the 'root' parameter, but nothing further about surface, depth, or timeout 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 pairs a specific verb ('Capture') with a precise resource ('accessibility tree as structured JSON with @ref IDs'), so an agent knows exactly what comes back. It does not differentiate itself from siblings like desktop_find, desktop_get, or desktop_list_windows, which is the only thing keeping this from a 5.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to call this versus desktop_find, desktop_get, or desktop_list_surfaces, and no stated preconditions. The mention of '@ref IDs' implicitly hints that this is the source of refs used by desktop_click and similar tools, but that requires inference rather than being stated.

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