Skip to main content
Glama
wechat-devtools-mcp

wechat-devtools-mcp

by WaterTian

wechat_automator

Automate WeChat Mini Program interactions and runtime queries: start automation, tap, input, inspect elements, call APIs, evaluate JS, and read page, system, and storage state.

Instructions

小程序自动化交互与运行时查询。 支持 action: start(开启自动化), tap(点击), input(输入), element_info(元素信息), set_data(设置数据), call_method(调用方法), call_wx(调用wx API), mock_wx(Mock wx), evaluate(执行JS), page_stack(页面栈), page_data(页面数据), system_info(系统信息), storage(缓存)。 返回 JSON: {success, data, message, error_code?}。

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.20
    • addedInput schema / $defs / WechatAutomatorInput / properties / ready_timeout
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 180,
      +      "minimum": 5,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "start 时等待 automator 首次应答的总秒数,默认 45(环境变量 WECHAT_AUTOMATOR_READY_TIMEOUT 可改);大项目冷启动可加大。",
      +  "title": "Ready Timeout"
      +}
  2. Changed3 schema fields changedv0.9.18
    • changedInput schema / $defs / WechatAutomatorInput / properties / args_json / description
      Previous value: -"方法参数 JSON 数组,call_method/call_wx 时可选。"New value: +"JSON 数组,call_method/call_wx 的方法参数,或 evaluate(fn_source) 的函数入参;可选。"
    • changedInput schema / $defs / WechatAutomatorInput / properties / expression / description
      Previous value: -"JS 表达式,evaluate 时必填。"New value: +"单个 JS 表达式,evaluate 时使用;多语句请改用 fn_source。"
    • addedInput schema / $defs / WechatAutomatorInput / properties / fn_source
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "evaluate 时可用:完整函数源码字符串,例如 'function(){ return wx.getSystemInfoSync(); }' 或 '(a,b)=>a+b',在小程序 AppService 内以 page.evaluate(fn, ...args) 方式执行,入参来自 args_json。函数体可含任意多条语句,需显式 return。与 expression 二选一,同时给则以 fn_source 为准。",
      +  "title": "Fn Source"
      +}
  3. First observedv0.9.16

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this is not read-only, not idempotent, and not destructive, so the safety profile is partly covered. The description adds the return envelope {success, data, message, error_code?}, which is helpful, but it does not disclose that actions like set_data and mock_wx mutate runtime state or that start launches/attaches to an automation session with timeout behavior.

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

Conciseness5/5

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

The purpose is front-loaded in the first line, followed by a compact action inventory and a one-line return contract. Every line conveys actionable information with no filler.

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?

An output schema exists, so return values need little elaboration, and the action inventory is complete. However, for a complex multi-action automation tool, the description omits essential operational context: start-before-use sequencing, environment prerequisites, and how this tool differs from the sibling inspector/navigate tools.

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?

Although the reported top-level coverage is 0%, the nested schema actually documents every field with action-conditional requirements (selector for tap/input, value for input, data_json for set_data, etc.). The description's action list adds only marginal semantics beyond the enum; the detailed parameter meaning is carried by the schema, so 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 the resource (小程序) and gives a concrete action taxonomy with short glosses for each action, so an agent can tell what family of operations the tool performs. It does not, however, distinguish this aggregate automator from siblings like wechat_inspector or wechat_navigate, which likely overlap with element_info and page_stack.

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?

Listing actions such as start(开启自动化) implies that automation must be started before interactive calls, which is useful implied guidance. But there is no explicit when-to-use versus siblings, no statement of prerequisites like DevTools being open or a project being loaded, and no guidance on choosing among the 13 actions.

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