Skip to main content
Glama

get_screen_state

Read-only

Capture the current Android or iOS screen as a filtered UI tree, screenshot, or both in one call to inspect elements and verify app state.

Instructions

Get the current screen state: UI tree and/or screenshot in a single call. UI tree is filtered to relevant elements by default.

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

Input Schema

NameRequiredDescriptionDefault
includeNoWhat to capture. Default: both
platformNoTarget platform. Inferred if omitted.
device_idNoDevice ID. Omit for the connected device.
filter_uiNoFilter UI tree to relevant elements only (with text or clickable). Default: true
force_fullNoReturn the tree even when it is identical to the last read. Default: false
max_elementsNoMaximum elements to return; the rest is summarized. Default: 120

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

B3.4/5.0
Behavior3/5

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

readOnlyHint=true already covers the safety profile, so the description's remaining burden is low. The one behavioral claim, that the UI tree is filtered to relevant elements by default, duplicates the filter_ui schema default rather than adding new context such as return format (text vs. image), truncation behavior, or the caching implied by force_full.

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 short sentences, front-loaded with the core capability and followed by the one default an agent most needs. No filler or redundant phrasing.

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 six optional parameters and no output schema, the description should say more about what comes back: whether a screenshot is returned as an image or reference, and how max_elements truncation is surfaced. It is adequate for selection but thin for correct invocation given the absent output schema.

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 every parameter is already documented with defaults and enums. The description only echoes the include concept and the filtering default; it adds no format, sizing, or interaction guidance beyond the schema.

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 ("Get the current screen state") and clarifies scope as "UI tree and/or screenshot in a single call," which implicitly separates it from the single-purpose siblings screenshot and get_ui_tree. It stops short of naming those alternatives, so the differentiation is inferred rather than explicit.

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 phrase "in a single call" hints that this is the combined-capture option, but there is no explicit statement of when to prefer it over calling get_ui_tree or screenshot separately. No preconditions or exclusions are given.

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