Skip to main content
Glama
liufeicc

cc-computer-use

by liufeicc

get_ui_tree

Read the desktop accessibility tree as compact text with [ref] numbers to identify and interact with UI elements precisely without screenshots or coordinate guessing.

Instructions

读取桌面无障碍元素树(结构化文本),这是感知屏幕的首选方式,不要默认用 screenshot。返回紧凑文本树,每个可操作元素带 [ref] 编号,后续用 click(ref)/type_text(ref) 精确操作,无需估算坐标。scope=active_window 最省 token(默认);找特定应用用 scope=app+app=名字关键词;整桌面用 scope=desktop(大,慎用)。interactive_only=true 只列可操作元素,进一步省 token。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNo
scopeNoactive_window
max_nodesNo
interactive_onlyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it explains the compact text-tree return, the [ref] mechanism for click/type_text, and the token-cost implications of scope and interactive_only. It does not disclose edge behaviors like failure modes or output size limits, but the core behavioral profile is clear.

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?

The description is a single dense paragraph with no filler, front-loading the most important guidance (preferred over screenshot) before explaining return format and parameters. Every clause adds operational value.

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?

Given an output schema exists, the description does not need to detail return structure, and it covers the main use cases, scope routing, and ref-based interactions. The only notable gap is the undocumented max_nodes parameter and a missing note about when screenshot might still be necessary, but overall the tool can be invoked correctly from this description.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It adds real meaning for scope values, the app keyword matching, and interactive_only, but never explains max_nodes or its default of 400, leaving one parameter semantically underspecified.

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

Purpose5/5

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

The description uses a specific verb ('读取') and resource ('桌面无障碍元素树'), and immediately differentiates itself from screenshot by declaring itself the preferred screen-perception method. This makes it unambiguously distinct from siblings like screenshot, get_screen_text, and get_screen_layout.

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?

It clearly states when to use this tool ('这是感知屏幕的首选方式') and explicitly warns against defaulting to screenshot, while also giving concrete scope-selection guidance for active_window, app, and desktop. It does not state explicit exclusions or when screenshot would be preferable, so it stops short of a perfect 5.

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