Skip to main content
Glama

Observe Native Ui

observe_native_ui
Idempotent

Captures a bounded accessibility tree and selected-window screenshot from an already-running native app using its PID and window ID; fails on denied OS permissions without broad capture or app launch.

Instructions

Observe an already-running native app by PID and window ID, bound to the active Mach-O target. Captures a bounded accessibility tree and selected-window screenshot; OS permission denial fails without broad capture or target launch.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pid": 123,
      "window_id": 456
    },
    "name": "observe_native_ui"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidYes
max_nodesNoMaximum accessibility nodes per capture; increase for large windows.
window_idYes
screenshotNo
accessibilityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare not read-only, idempotent, non-destructive and open-world. The description contributes real context beyond them: OS permission denial causes failure, and it does so without broad capture or target launch. It still omits return shape, pagination/truncation behavior when max_nodes is hit, and what the screenshot format is.

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?

Two dense, front-loaded sentences with no filler; the capture scope is stated right after the identity of the target. Slightly packed with qualifiers, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 should convey more about what comes back (tree shape, screenshot encoding, behavior when the bounded tree truncates). It covers permissions and scope well but leaves the toggles and return semantics thin for a 5-parameter observation tool.

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 coverage is 20% – only max_nodes is documented in the schema. The description ties pid and window_id to the target app/window and calls the tree 'bounded', hinting at max_nodes, but the screenshot and accessibility toggles and their defaults get no explanation, leaving half of the parameters undocumented in both places.

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 concrete verbs and resources: 'Observe an already-running native app by PID and window ID' plus 'Captures a bounded accessibility tree and selected-window screenshot.' The 'already-running' qualifier implicitly separates it from the sibling capture_native_ui_scenario, though no sibling is named explicitly.

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?

The preconditions are implied: app already running, target bound, PID and window ID available. There is no explicit when-to-use or when-not guidance and no named alternative for capture or launching scenarios, so the agent must infer routing from 'already-running'.

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

Deploy Server

Other Tools