Skip to main content
Glama
1999AZZAR

scrcpy-mcp

by 1999AZZAR

ui_get_state

Read-only

Dump the current Android UI into a Markdown-like tree of visible and clickable elements with viewport coordinates, enabling precise targeting of on-screen fields for device interaction.

Instructions

Dump the UI and return a clean Markdown-like tree of visible and clickable elements with viewport coordinates. NOTE: WebView elements may report identical y-coordinates when scrolled; use scroll_to_element first to bring target fields into view.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNoDevice serial number

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYesSimplified UI state
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, covering safety profile. The description adds the WebView coordinate scrolling caveat, which is valuable behavioral context beyond annotations. It does not describe return schema details, but an output schema exists. Good disclosure of a known quirk.

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?

Two sentences, tightly written, front-loaded with the core purpose followed by a single high-value caveat. No wasted words or filler.

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?

For a read-only UI inspection tool with a single well-documented parameter, an output schema present, and readOnly/openWorld annotations covering safety, the description is largely sufficient. The coordinate-caveat adds meaningful operational context. Could slightly benefit from mentioning whether this is a tree of the full screen or focused window, but overall complete.

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?

Only one parameter (serial) with 100% schema description coverage, so the schema already documents it adequately. The description adds no extra parameter semantics beyond what the schema provides, which is acceptable given complete schema coverage.

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?

Clear verb+resource: 'Dump the UI and return a clean Markdown-like tree of visible and clickable elements with viewport coordinates.' Distinguishes well from siblings like ui_dump and ui_find_element by specifying the tree structure and coordinates. However, the relationship to ui_dump is not explicitly clarified, leaving some ambiguity about which to choose.

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?

Includes a practical NOTE about WebView elements reporting identical y-coordinates when scrolled and recommends scroll_to_element first. This is actionable usage guidance. However, it doesn't explicitly contrast with ui_dump or state when to prefer one over the other.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/1999AZZAR/scrcpy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server