Skip to main content
Glama

页面跳转

wdt_navigate

Navigates within the current mini program using navigateTo, redirectTo, reLaunch, switchTab, or navigateBack, with optional app.json page validation for each target route.

Instructions

在当前小程序中跳转:navigateTo / redirectTo / reLaunch / switchTab / navigateBack。

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": {
      "mode": "<mode>"
    },
    "name": "wdt_navigate"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo目标路径,如 /pages/index/index
modeYes
validateNo是否按 app.json 校验目标页面,默认 true;动态页面可设 false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

C2.8/5.0
Behavior2/5

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

No annotations were supplied, so the description must carry the full burden of behavioral disclosure, yet it provides no information beyond the tool's name. It says nothing about page-stack effects, tabBar requirements for switchTab, whether the mini program must be connected or logged in first, or that navigateBack takes no url.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence that is front-loaded with the core action, which is good structure. However, the list of five mode names duplicates the schema enum and uses up the only sentence, which could have carried more valuable guidance.

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?

For a 3-parameter navigation tool with no annotations and no output schema, the description is too thin: it omits mode-selection semantics, prerequisite connection state, and what the call returns or does to the page stack. An agent would still need to guess which mode fits a given task.

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 67%: url and validate are documented in the schema, while mode has only an enum. The description's enumeration of mode values merely repeats that enum and does not explain which modes require url or how validate interacts with dynamic pages, so it adds little beyond the schema.

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 clear verb (跳转/navigate) and a clear resource scope (在当前小程序中, within the current mini program), so an agent knows it drives page navigation. It does not distinguish itself from siblings such as wdt_open or wdt_current_page, which keeps it at 4 rather than 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 about when to use this tool instead of a sibling, and no guidance about when to choose each of the five modes. The only implicit signal is the enumerated list of mode names, with no explanation of the differences between navigateTo, redirectTo, reLaunch, switchTab, and navigateBack.

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