Skip to main content
Glama

desktop_cdp_elements

Lists actionable controls on the current page from the CDP accessibility tree, returning role, name, depth, and deduplicated elements for UI inspection and automation.

Instructions

列出当前页面内的控件(CDP 无障碍树)。 返回角色(button/link/textbox/...)、名称、层级深度。中文名称完整保留。 已自动去重:AX 树给一个按钮同时产出 button/StaticText/InlineTextBox,这里只留能操作的那个。

Input Schema

NameRequiredDescriptionDefault
roleNo按角色过滤,如 button / link / textbox
limitNo最多返回多少个,默认 120
sessionNo会话 id,省略则用当前会话

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

B3.4/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 it does disclose real behavior: de-duplication of AX nodes (only the operable button is kept) and full preservation of Chinese names. That is meaningful context beyond the schema. It does not disclose that it is read-only, what connection state it requires, or pagination/truncation behavior when `limit` is hit, leaving notable gaps.

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

Conciseness4/5

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

The description is short and front-loaded: the first line states what it does and where, and the dedup note is the most useful extra detail. The Chinese-name preservation remark is marginally useful. Minimal waste overall.

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

Completeness3/5

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

With no output schema, the description does cover the return shape (role, name, depth), which is the main completeness need. But for a tool with no annotations it omits prerequisites (CDP session/attach state) and truncation semantics for `limit`, leaving an agent without enough to call it reliably in edge cases.

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?

Schema coverage is 100% — all three parameters (`role`, `limit`, `session`) carry their own descriptions, so the schema does the heavy lifting. The description adds nothing about parameter behavior (e.g., what role values are valid or how limit truncation surfaces), so the baseline of 3 applies.

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?

The description gives a specific verb and resource: enumerate the controls in the current page via the CDP accessibility tree, and it names the fields returned (role/name/depth). The phrase '当前页面' (current page) signals a browser/CDP context. However, it never explicitly contrasts with the sibling desktop_elements, which appears to be the non-CDP equivalent, so an agent must still infer the distinction.

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?

Usage is implied by the CDP context and 'current page' scope, but the description never states when to prefer this over desktop_elements or desktop_perceive, nor does it say any prerequisites (e.g., an attached CDP session). The optional `session` param hints at a session model, but the conditions for choosing this tool are left to inference.

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