Skip to main content
Glama

desktop_snapshot

Read a macOS window as structured text so AI agents can inspect UI elements by reference and get only changed lines instead of screenshots.

Instructions

Read a window as text: one line per element eN role "name" ="value" [states]; refs are @:eN from the header. goal = words on screen to keep only related elements; root = a ref to drill into; surface = menubar | menu | menu-bar-extras | sheet | popover | alert; diff = only changes since your last view. interactive_only hides read-only text such as a result display. For a menu command use find(surface=menubar, name=…) and click it. ^(…) marks superscript text (2^(10) = 2¹⁰).

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
appNo
diffNo
goalNo
rootNo
compactNo
surfaceNowindow
skeletonNo
max_depthNo
window_idNo
timeout_msNo
include_boundsNo
interactive_onlyNo
force_electron_a11yNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the textual element format, the header-relative ref syntax (@<snapshot>:eN), the allowed surface values, and diff semantics, which is genuinely useful behavioral context. However, it says nothing about timeout behavior, the cost/latency of a deep snapshot, or what force_electron_a11y and skeleton change, leaving several behavioral traits undisclosed.

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?

The output format and ref syntax are front-loaded, which is the right priority, and the semicolon-separated clauses are dense but each conveys a distinct option. It is somewhat crammed and mixes output-format explanation with parameter hints in one paragraph, costing a little readability.

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 a 13-parameter tool with no annotations and no output schema, the description covers the return format well but leaves the majority of parameters unexplained. An agent could call it with defaults, but would be guessing at what max_depth, skeleton, compact, include_bounds, or force_electron_a11y do, which is a significant gap for this complexity.

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% across 13 parameters, so the description must compensate. It explains goal, root, surface, diff, and interactive_only, but leaves app, compact, skeleton, max_depth, window_id, timeout_ms, include_bounds, and force_electron_a11y entirely undocumented in both schema and description — eight of thirteen parameters are opaque.

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 opens with a specific verb and resource: 'Read a window as text', and immediately defines the output shape (`eN role "name" ="value" [states]`), which clearly separates it from a screenshot-style sibling. It does not explicitly name desktop_screenshot or desktop_get as alternatives, so the differentiation is implied rather than stated.

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?

It gives concrete conditions for several options — 'goal = words on screen to keep only related elements', 'diff = only changes since your last view', 'interactive_only hides read-only text' — and routes menu commands to find(surface=menubar) plus click. It never states when to prefer this over desktop_screenshot or desktop_get, so guidance is strong but not complete.

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