Skip to main content
Glama

读取/修改页面数据或调用页面方法

wdt_page_data

Read page data, update data via setData, or call page methods in WeChat Mini Program DevTools automation.

Instructions

action=get 读取 data(可选 path);action=set 调用 setData;action=call 调用页面方法。

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": "wdt_page_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNo
dataNo
pathNo
actionYes
methodNo

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 are supplied, so the description carries the full behavioral burden, and for a tool that mutates live page data (action=set) it says nothing about side effects, reversibility, required page/auth state, or failure modes. It only restates the mapping of action to underlying API call, which is close to what the name implies.

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?

A single dense sentence with semicolon-separated action clauses, front-loaded with the action enum. It wastes no words but is cryptic enough that brevity comes at the cost of clarity.

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?

Five parameters, no annotations, no output schema, and zero schema descriptions leave an agent underequipped: it cannot know what args accepts for call, what shape data must be for set, or what a successful response looks like. For a read/write page-data tool this is a meaningful gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across five parameters, so the description must compensate and it only partially does: it explains the three action enum values and mentions path as optional for get and data for read. It never explains args, never says data is the payload for set, and never ties method to action=call, leaving the param-to-behavior mapping ambiguous.

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 the resource (page data / page methods) and enumerates the three action modes with a specific verb for each: action=get reads data, action=set calls setData, action=call invokes a page method. An agent can tell what the tool does, though it does not distinguish it from nearby tools such as wdt_evaluate or wdt_query.

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?

The per-action phrasing implies which action to pick for reading vs writing vs method invocation, which is useful internal routing. However, it gives no guidance on when to use this tool instead of siblings like wdt_evaluate, no preconditions (e.g. page must be loaded), and no exclusions.

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