Skip to main content
Glama

ruyi_dom_select

Locate DOM elements in a page using CSS selectors, XPath, tag names, or text content. Specify a selector and optional timeout to find elements for automation.

Instructions

在页面中定位 DOM 元素。支持 CSS 选择器、XPath、标签名、文本内容等多种定位方式。格式: "#id" / "css:.class" / "xpath://div" / "tag:input" / "text:登录"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdxNo
timeoutNo等待超时(秒),默认 10
selectorYes元素选择器。支持:#id, css:.class, xpath://div, tag:input, text:登录
Behavior2/5

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

Without annotations, the description carries the full burden of disclosure. It adds useful selector format examples but does not explain the return value, error behavior when the element is not found, or whether the timeout parameter triggers a wait. The timeout is present in the schema but its behavioral implication is not described.

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 sentence plus a compact format list. It is front-loaded with the core purpose and contains zero wasted words.

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?

Given there is no output schema, the description should explain what the tool returns (element information, handle, etc.) and what happens if the selector does not match. It also leaves pageIdx unexplained. For a tool used to locate elements for subsequent interactions, this is a significant gap.

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?

The description supplements the schema with concrete selector format examples (e.g., '#id', 'css:.class', 'xpath://div'), which adds meaning. However, the pageIdx parameter has no description in either schema or description, and the timeout behavior is only implied. Schema coverage is 67%, so the description provides some but not full compensation.

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 clearly states the tool locates DOM elements in the page, which is a specific verb+resource. It lists multiple selector formats, making its role as a locator distinct from action-oriented siblings like ruyi_dom_click or ruyi_dom_input, but it does not explicitly differentiate itself.

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?

No guidance is given on when to use this tool versus other DOM tools (ruyi_dom_get_info, ruyi_dom_click, etc.). The description implies it is for locating, but does not clarify that it should be used before actions or how it relates to alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Facetomyself/ruyi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server