Skip to main content
Glama

等待页面条件

wdt_wait

Waits for a CSS selector to appear or for a fixed duration, up to 60 seconds, helping synchronize WeChat DevTools automation before interacting with elements.

Instructions

等待 CSS 选择器出现(传字符串)或等待固定毫秒数(传数字),最长 60 秒。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target": "<target>"
    },
    "name": "wdt_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYes
timeoutMsNoMCP 层超时,默认 60000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description has to carry the full burden of disclosing the tool's behavior. It does disclose a meaningful limit, a 60-second maximum wait, but it does not state timeout or failure behavior, whether an error is thrown or a boolean is returned, or whether a page action is required for the wait to proceed. The relationship between the 60-second cap and the timeoutMs default of 60000 is left unclear.

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?

It is a single sentence that front-loads the two modes and ends with the cap, with zero redundant wording. Every clause carries information an agent needs before calling the tool.

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 annotations and no output schema, the description should also explain return values and failure semantics. It covers the two modes and the 60-second ceiling well, but an agent still cannot predict what the call yields on success or timeout, which matters for a blocking wait tool.

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 coverage is only 50% because target has no schema description, and the description supplies exactly that missing meaning: string means wait for a CSS selector, number means wait fixed milliseconds. That is genuine value beyond the schema. It does not explain how timeoutMs interacts with the 60-second wait cap, which is the one remaining semantic gap.

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 states a concrete verb (wait) and two precise resource modes: a CSS selector appearing, or a fixed millisecond delay. That verb and these modes identify the tool without ambiguity. It does not explain why this tool differs from wdt_page_data or wdt_element, which also inspect page state, so it falls short of the fully distinguishing language that a 5 requires.

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 gives an explicit rule for choosing a mode: pass a string to wait for a selector, or pass a number to wait a fixed duration. That is actionable context, not an implication. It does not say when to avoid the tool, how it relates to wdt_element polling, or what happens if neither condition is met, so there are no exclusions.

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