Skip to main content
Glama

Ui Json

ui_json

Retrieve the current device screen hierarchy as JSON to let AI agents inspect UI elements, text, and coordinates for mobile automation.

Instructions

The UI snapshot serialized as JSON text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceNo
filterNo
indentNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it only says the result is a JSON-serialized snapshot. It does not state that it is a read-only operation, how large the output may be, whether `device` defaults to the active device, or what `filter` removes.

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

Conciseness3/5

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

It is a single short sentence with no filler, so it is concise. However, the brevity comes at the cost of substance — there is no front-loaded verb or usage context to anchor it.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, but the definition is still incomplete: parameters are undocumented, there is no usage guidance against sibling tools, and no behavioral traits are disclosed despite the absence of annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Three parameters (`device`, `filter`, `indent`) have 0% schema description coverage, and the description mentions none of them. 'Serialized as JSON text' loosely gestures at formatting but explains neither the boolean `filter` nor the `indent` width, so an agent cannot infer their effect.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description is a noun phrase ('The UI snapshot serialized as JSON text') with no verb, so it only passively restates the title 'Ui Json' with a little extra detail. It gives no way to tell this apart from close siblings such as `ui`, `ui_with_recovery`, or `get_ui_tree`, which also deal with UI state.

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

Usage Guidelines2/5

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

There is no when-to-use, when-not-to-use, or alternative guidance. With several overlapping UI-retrieval siblings present, the agent is left to guess which of `ui_json`, `ui`, `ui_with_recovery`, or `get_ui_tree` to invoke.

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