Skip to main content
Glama

get_ui_dump

Retrieve the Android UI view hierarchy in XML format to analyze screen structure and identify elements.

Instructions

获取 XML 格式的 UI 视图层级,用于理解屏幕结构和定位元素。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
returned_attributesYes要返回的属性列表(逗号分隔),例如 'bounds,class,text,clickable,resource-id'。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose the key behavioral trait that output is XML hierarchy data. However, it says nothing about whether the call mutates device state (it does not, but that is not stated), the potential size/latency of a full dump, or any rate limits. Adequate but incomplete for an unannotated tool.

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 tight sentence that front-loads what is returned (XML UI hierarchy) before the purpose. Nothing is padded or repeated.

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 one-parameter read tool with full schema coverage and an output schema, the description covers purpose and output format adequately. It could still be strengthened with a read-only assurance and a pointer to get_screenshot as the visual alternative, given the absence of annotations.

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?

There is one parameter with 100% schema description coverage, including a concrete comma-separated example ('bounds,class,text,clickable,resource-id'), so the schema already does the heavy lifting. The description adds no extra meaning about the parameter, making the baseline 3 correct.

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 ('获取 XML 格式的 UI 视图层级') plus the intent behind it ('理解屏幕结构和定位元素'), which is far more than a restatement of the name. It implicitly separates itself from get_screenshot by specifying XML hierarchy output, but never names or contrasts a sibling tool, so it falls short of the top band.

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 clause '用于理解屏幕结构和定位元素' implies when this tool is useful, but there is no explicit when-to-use vs when-not guidance and no mention of the obvious alternative (get_screenshot) or of how the two complement each other. Usage is left to inference.

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