Skip to main content
Glama
hooplus1ce

DrissionPage-MCP

by hooplus1ce

查找元素

find_element
Read-only

Locate an element in a specified tab using a locator (CSS, XPath, text, etc.) and optional frame, index, and timeout, returning an element ID for further interaction.

Instructions

在标签页中定位一个元素,返回摘要与 element_id(供交互工具使用)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameNo搜索范围:省略=主文档+自动穿透 iframe;'main'=仅主文档; 'active'=激活态 iframe;也可用序号或 iframe 的 id/name(见 frame_list)
indexNo第几个匹配元素(从 1 开始,负数表示从末尾倒数)
tab_idNo标签页 id,省略时用最新标签页
locatorYes定位符,如 '#kw'、'.btn'、'tag:input'、'@name=q'、'text:搜索'、 'css:.list>li'、'xpath://a[@href]'、'ax:@role=button';不带前缀时自动匹配
timeoutNo未找到时的最长等待秒数

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
textNo
xpathNo
element_idYes
css_selectorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations include readOnlyHint: true, and the description mentions only locating and returning data, with no contradictory side effects. It does not add extra behavioral details beyond the annotation, but is consistent.

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, concise sentence that leads with the action (locate an element) and clearly states the return value, with no unnecessary words.

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?

The description indicates the return value (summary and element_id) and there is an output schema present, so the description is adequate for calling the tool correctly. It does not explain the summary content, but the output schema likely covers it.

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?

All parameters have schema descriptions covering 100% of the parameters, providing detailed syntax for locator and other options. The description itself adds no additional parameter information, so baseline 3 applies.

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?

States the tool locates an element in a tab and returns a summary and element_id, clearly distinguishing it from find_elements (plural) and wait_element.

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?

Does not explicitly mention when to use this tool versus alternatives like wait_element or find_elements, though it implies use for subsequent interaction tools. The description provides some context but lacks explicit guidance.

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