Skip to main content
Glama

获取当前页面与页面栈

wdt_current_page
Read-only

Retrieves the current mini program page path, query parameters, and page stack path to help you inspect navigation state and debug routing in WeChat DevTools.

Instructions

返回当前小程序页面的路径、query,以及页面栈路径。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "wdt_current_page"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

B3.2/5.0
Behavior3/5

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

readOnlyHint=true already establishes this is a safe, non-mutating call, so the description needn't re-establish safety. It does add value by disclosing the returned content (path, query, page stack), which matters because there is no output schema, but it omits behavior such as what happens when no page/project is active or how the stack is ordered or formatted.

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?

A single short sentence with no filler, and the returned fields come first. It is appropriately sized for a trivial read-only tool, though it is bare enough that a little structural framing (what/when) is absent.

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?

For a zero-parameter read tool the bar is low and the description covers the return contents. Completeness suffers because there is no output schema, so the shape of the page stack and failure conditions (not connected, no project open) are never described.

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?

Zero parameters, so the baseline is 4; however the description adds nothing about option handling or filtering that a caller might expect, and the argument-free nature makes depth unnecessary. The schema fully covers the (empty) parameter surface.

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?

Names a specific verb (返回) and resource (当前小程序页面的路径、query、页面栈路径), so an agent knows exactly what data comes back. It does not distinguish itself from a nearby sibling such as wdt_page_data, so which one to call for page content vs. page identity is left to inference.

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 only states what is returned; it gives no when-to-use condition, no prerequisites (e.g. must be connected/auto-started first), and no mention of alternatives. Guidance is entirely inferred from the tool name and siblings.

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