Skip to main content
Glama
weapp-driver-mcp

weapp-driver-mcp

by Gao12123

Navigate the mini program

mp_navigate

Routes mini program pages via navigate, redirect, relaunch, tab switch, or back, and waits until the expected path is observed; reports a timeout with the stuck page if navigation never lands.

Instructions

Route the mini program (navigate_to, redirect_to, re_launch, switch_tab, navigate_back) and wait until the app actually lands. Returns as soon as the expected path is observed, instead of sleeping a fixed interval, so a fast transition costs milliseconds. A navigation that never lands reports a timeout with the page it was stuck on.

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": {
      "action": "<action>"
    },
    "name": "mp_navigate"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoTarget page path, e.g. "/pages/detail/index?id=7". Required for every action except navigate_back.
actionYesRoute call: navigate_to (push), redirect_to (replace), re_launch (reset stack), switch_tab (tab bar), navigate_back (pop).
settle_msNoExtra wait after the new page is reached, for data loads. Defaults to 0.
timeout_msNoHow long to wait for the landing page. Defaults to 10000.
expected_pathNoPath the app must land on before the call returns, e.g. "pages/detail/index". Defaults to the url path, or to the observable effect of the action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the polling-and-landing model, that it returns immediately on observation rather than sleeping a fixed interval, and that failure surfaces as a timeout reporting the page it was stuck on. It does not state the success return shape or whether navigation is reversible.

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?

Three tight sentences, front-loaded with the core behavior and the latency rationale. The parenthetical action list partially duplicates the schema enum, but it is short and aids scanning rather than bloating the text.

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 five-parameter tool with no annotations and no output schema, the description covers the essential contract: what it does, how it blocks, and how failure is reported. Missing only the success return value and prerequisites, which are modest gaps given full schema coverage.

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 coverage is 100%, so all five parameters including expected_path and the action enum are already documented in the schema. The description reinforces the expected-path observation concept but adds no syntax or default details beyond the schema, so the baseline 3 applies.

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 names a specific verb ('Route the mini program'), enumerates the five navigation actions, and adds the distinguishing trait that it waits for the landing page. That separates it from a plain wait or launch tool, though it never names a sibling explicitly.

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?

Usage is only implied: an agent can infer this is the tool for moving between pages and blocking until the destination is reached. There is no explicit when-to-use versus mp_wait or mp_launch, and no stated preconditions such as the app already being launched.

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