Skip to main content
Glama
hooplus1ce

DrissionPage-MCP

by hooplus1ce

等待元素

wait_element
Read-only

Wait for an element to appear after page load or AJAX rendering. Specify a locator and timeout to pause execution until the element is ready for interaction.

Instructions

等待元素出现(页面加载、AJAX 渲染后返回)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameNo搜索范围,同 find_element 的 frame 参数('active'=激活态 iframe)
tab_idNo标签页 id,省略时用最新标签页
locatorYes定位符,如 '#submit'、'text:登录'、'css:.item>button'、'xpath://a'
timeoutNo最长等待秒数

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
foundYes
tab_idYes
locatorYes
elapsed_hintNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

The description only states the action (wait for element) and does not describe timeout behavior, what happens on failure, or whether it returns immediately after appearance. The annotation readOnlyHint covers the read-only nature, but the description adds no extra behavioral context such as blocking or potential errors.

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 immediately states the core purpose. It is well-structured and front-loaded with the primary function, making it easy to parse.

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 simple waiting operation, the description is adequate. It states the action and the context (page load/AJAX). The output schema and annotations fill in the return details, so the description is sufficiently complete for this tool's complexity.

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 schema descriptions cover all four parameters (frame, tab_id, locator, timeout) with 100% coverage. The tool description itself does not elaborate on these, but since the schema already provides sufficient semantic detail, a baseline score of 3 is appropriate.

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's function: 'wait for element to appear' (等待元素出现). It also provides context about when this occurs (page load, AJAX render). However, it does not explicitly differentiate from find_element, which might also be used to locate elements, so it is not a perfect 5.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention conditions like 'when you need to ensure an element is present before interacting' or contrast with find_element. The name and description imply waiting, but explicit usage instructions are absent.

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