Skip to main content
Glama

page_waitRoute

Poll until the current page route matches the specified path, verifying that indirect navigation triggered by tap or callMethod has completed. Returns matched status and wait time.

Instructions

轮询等待当前页面路径变为指定值,用于验证跳转真正完成(尤其是由 tap / callMethod 间接触发的跳转)。path 传页面路由,与 page.path 同形:无前导 /、不含 query(如 pages/detail/detail)。成功返回 {path,matched:true,waitTime,query};超时抛错并附当前实际 path 便于排查。注意:mp_navigate 返回的 activePage 已是可信的最新路由,导航后通常无需再 waitRoute;本工具主要用于间接跳转。timeout 默认 5000ms,retryInterval 默认 200ms。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
timeoutNo
connectionNo可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。
retryIntervalNo
Behavior5/5

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

No annotations provided, but description fully discloses behavioral traits: polling mechanism, success output format, error behavior with current path, default values for timeout and retryInterval. No contradictions.

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?

Description is well-structured: first sentence states purpose, then details path format, return behavior, usage note, and defaults. No wasted words, front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, but description explains return values and error behavior. Covers complex scenario of indirect navigation. With 4 parameters (one nested), description provides sufficient context for correct usage.

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 description coverage is 25% (only connection has description). Description adds critical meaning: path format (no leading '/', no query), default values for timeout (5000ms) and retryInterval (200ms). However, it does not describe the connection parameter beyond what schema already provides.

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?

Description clearly states the tool polls until page route matches specified value, used to verify navigation completion, especially for indirect jumps. It distinguishes from siblings like mp_navigate and page_expectRoute implicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (indirect navigation via tap/callMethod) and when not to (after mp_navigate, since activePage is already latest). Mentions alternative mp_navigate.

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/Chaixueyuan/weapp-agent-mcp'

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