Skip to main content
Glama

App state

get_app_state
Read-only

Captures an app's accessibility tree as an indexed snapshot so you can click, set values, scroll, or drag the correct controls.

Instructions

Snapshot one app: App=<name> (pid N) followed by its accessibility tree, each node prefixed with the index you pass to click / set_value / scroll / drag.

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": "get_app_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesWindow title substring, process name, or handle
max_depthNo
max_nodesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds real value beyond that: the exact output layout (header line with name and pid, then an accessibility tree) and the meaning of the per-node index. It does not disclose truncation behavior from max_depth/max_nodes, which is the remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence that front-loads the verb, the scope, and the return format. Nothing is redundant.

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 rightly explains the return format, which is the most important thing here. However, two of three parameters are unexplained and the agent is not told that the tree may be depth- or node-limited, which matters for a snapshot 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 only 33%: only 'app' is described in the schema, and the description merely restates it as 'App=<name>'. The max_depth and max_nodes parameters are undocumented in both the schema and the description, so an agent gets no sense of what they control or how they affect the snapshot.

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 ('Snapshot one app') and even sketches the return shape. The 'one app' framing implicitly separates it from browser_snapshot and list_apps, but 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?

Usage is only implied through the mention that node prefixes are 'the index you pass to click / set_value / scroll / drag', which tells an agent to snapshot before interacting. There is no explicit when-not guidance and no named alternative for browser windows or app enumeration.

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