mp_currentPage
获取当前微信小程序页面的路径、查询参数、尺寸和滚动位置,可选返回页面数据,用于确认页面状态。
Instructions
获取当前页面的信息,包括路径、查询参数、尺寸和滚动位置。通常在 mp_ensureConnection 成功后立即调用,用于确认当前页面。withData 为 true 时额外返回页面数据。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | ||
| withData | No |
获取当前微信小程序页面的路径、查询参数、尺寸和滚动位置,可选返回页面数据,用于确认页面状态。
获取当前页面的信息,包括路径、查询参数、尺寸和滚动位置。通常在 mp_ensureConnection 成功后立即调用,用于确认当前页面。withData 为 true 时额外返回页面数据。
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | ||
| withData | No |
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It truthfully states the tool retrieves information without implying side effects, though it could explicitly state it is a read-only operation. The optional return of page data with withData is disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two short sentences, no filler, and front-loads the purpose. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has a complex nested parameter and no output schema, the description is incomplete. It omits details about the connection parameter and what the return data contains (beyond path, query, size, scroll). The usage context helps, but key aspects are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain parameters. It only explains the withData parameter ('when true, additionally returns page data') but provides no explanation for the complex 'connection' nested object with many properties, leaving its semantics unclear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool retrieves current page information including path, query parameters, size, and scroll position. It distinguishes itself from siblings like page_getData or page_callMethod by focusing on the page's current state. The mention of typical usage after mp_ensureConnection further clarifies its role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly recommends calling this tool after mp_ensureConnection succeeds, providing clear usage context. It also explains when to set withData=true for additional data. However, it does not mention when not to use this tool or alternative tools for similar purposes.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yfmeii/weapp-dev-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server