Skip to main content
Glama

inspect_app

Read-only

Inspect a permitted app's accessibility tree by bundle ID or frontmost desktop, with automatic diffing of repeat views to reduce tokens while keeping element refs live and actionable.

Instructions

AX-first semantic inspection of a permitted app bundle ID or 'desktop' (frontmost app). Auto-diffs repeat views (state_mode='full'|'diff'|'unchanged'|'filtered') to minimize tokens while keeping refs live; pass diff=false for full baseline, include_bounds=true for @(x,y,wxh), or query for filtered lookup. Returns compact accessibility tree with refs (e1, e2...) and learned workflow hints.

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": {
      "app": "<app>"
    },
    "name": "inspect_app"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYes
diffNoEnable incremental AX tree diffing vs prior snapshot of the same app/window (defaults to config snapshot.ax_diff, true).
queryNo
windowNo
include_boundsNoInclude @(x,y,wxh) element coordinates in AX outlines (defaults to config snapshot.include_bounds, false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.7/5.0
Behavior4/5

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

Goes well past the readOnly/non-destructive annotations: it discloses that repeat views are auto-diffed to save tokens, that refs stay live across calls, and that the return is a compact AX tree plus 'learned workflow hints'. That is genuinely useful operational context. Minor demerit: it references a state_mode parameter set that does not exist in the schema, which could mislead an agent.

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 core identification, then packed into two dense sentences with no filler. The semicolon-chained clauses are efficient, though the embedded state_mode enumeration is wasted text that also introduces a schema mismatch.

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?

With no output schema, the description usefully describes the return shape (compact AX tree with e1/e2 refs and workflow hints) and the diffing behavior that governs output size. The main gaps are the unexplained 'window' parameter and missing detail on what 'permitted' means when access fails.

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 40%, and the description compensates for app, diff, include_bounds, and query by explaining the effect of each. But 'window' is never explained, and the description introduces state_mode='full'|'diff'|'unchanged'|'filtered', which has no counterpart in the schema and conflicts with the actual boolean diff parameter, creating ambiguity rather than meaning.

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?

States a specific verb and resource: 'AX-first semantic inspection' of an app bundle ID or 'desktop'. The 'AX-first' phrasing implicitly distinguishes it from the visual_inspect/screenshot siblings by signaling it returns an accessibility tree rather than pixels, though it never names an alternative outright.

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

Usage Guidelines3/5

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

Gives per-mode guidance ('pass diff=false for full baseline', 'include_bounds=true ... or query for filtered lookup') and clarifies that 'desktop' targets the frontmost app. However, it never says when to choose this tool over visual_inspect or screenshot, and offers no exclusions or prerequisites beyond the vague word 'permitted'.

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