Skip to main content
Glama
xzaleksey

open-mobile-mcp

by xzaleksey

get_semantic_hierarchy

Retrieve a pruned, semantic UI hierarchy as JSON to identify visible elements and their states on Android or iOS devices, enabling targeted mobile automation decisions.

Instructions

Get pruned, semantic UI hierarchy as JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdYes
platformYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the output is JSON and that the hierarchy is 'pruned', but never explains what pruning removes or whether the operation requires a connected device. As a read-oriented 'get' operation this is likely safe, but nothing in the text confirms that.

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?

A single short sentence is efficient and front-loaded with the action verb. However, the brevity borders on under-specification; it omits any behavioral or parameter detail while claiming to describe a meaningful operation, so the sentence does not fully earn its place.

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?

With two simple parameters, no output schema, and no annotations, the description is too thin. An agent is left without knowing what the 'pruned' JSON contains (element bounds, accessibility labels, etc.), when to prefer this over sibling tools, or what happens if the device is unavailable. The return format is stated only as 'JSON', which is vague.

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 description coverage is 0%, and the description adds nothing about the two parameters. deviceId and platform are simple and partially self-evident from the enum, but an agent is not told where deviceId comes from (e.g., device_list) or that platform must match the device's OS. The description fails to compensate for the absent schema documentation.

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 (get) and a distinct resource ('pruned, semantic UI hierarchy'). The qualifiers 'pruned' and 'semantic' help set it apart from siblings like get_viewport and get_screen_text. However, it doesn't explicitly name any sibling it is not, so differentiation is implicit rather than stated.

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?

Provides no guidance on when to use this tool versus alternatives such as get_viewport, find_element, analyze_layout_health, or get_screen_text. No context, exclusions, or mention of a device connection prerequisite is given. An agent would have to infer the appropriate call from the name alone.

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