Skip to main content
Glama
wooter-s

weixin-devtools-mcp

by wooter-s

wait_for

Wait for UI elements to appear, disappear, or match text in WeChat mini-programs. Specify a target, timeout, or visible state to synchronize test actions with page states.

Instructions

等待条件满足,支持等待元素出现、消失、文本匹配等

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo等待元素包含指定文本
delayNo等待指定毫秒数(时间等待模式)
targetNo等待元素目标(定位等待模式)
timeoutNo超时时间(毫秒),默认5000ms
visibleNo等待元素可见状态,true为可见,false为隐藏
disappearNo等待元素消失,默认false

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
codeYes
dataYes
metaYes
errorYes
warningsYes
nextActionsYes
observationYes
partialDataYes
schemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are present, so the description carries the full burden of behavioral disclosure. It mentions wait modes but does not disclose how polling works, behavior on timeout, whether a timeout throws or returns normally, or whether waiting has side effects. The description largely restates schema properties rather than adding operational context.

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 a single concise sentence with the main purpose front-loaded and supported modes listed compactly. The trailing '等' adds mild vagueness, but the description wastes no words and is easy to scan.

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?

The tool has a complex schema with six optional parameters, a polymorphic target, multiple matching modes, and timeout semantics, yet no annotations and no behavioral guidance in the description. It does not explain how delay relates to the wait-target modes, what happens at timeout, or whether visible and disappear are mutually exclusive. For this complexity, the description is too sparse.

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 description coverage is 100%, so the schema already documents all six parameters and their modes. The description adds little beyond the schema, merely grouping visible, disappear, and text concepts without explaining combinations, precedence, or which params are mutually exclusive. Baseline 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 states the tool waits for a condition, and explicitly enumerates supported condition kinds: element appearance, disappearance, and text matching. This clearly identifies the operation and resource. It does not explicitly contrast with sibling assertion/query tools, so it stops short of a 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 gives no guidance on when to use wait_for instead of related tools such as assert_state, assert_text, find_elements, or get_page_snapshot. It implies a synchronization role but provides no exclusions, prerequisites, or alternative routing.

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