Skip to main content
Glama
wechat-devtools-mcp

wechat-devtools-mcp

by WaterTian

wechat_inspector

Read-onlyIdempotent

Captures WeChat mini-program runtime logs and JS exceptions via console or CDP, returning structured JSON summaries for debugging and troubleshooting.

Instructions

采集小程序运行时日志和异常。 支持 action: console(automator端口采集console日志和JS异常), cdp(通过CDP协议采集WXML警告、渲染层报错、废弃API提示等底层日志)。 cdp action 需先以 cdp_enabled=true 打开项目,确保端口 9222 可用。 返回 JSON: {success, data: {logs, summary}, message}。

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.20
    • changedInput schema / $defs / WechatInspectorInput / properties / cdp_port / description
      Previous value: -"CDP 调试端口。"New value: +"CDP 调试端口,不传则沿用本会话 wechat_ide(open) 的端口。"
  2. First observedv0.9.16

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false. The description adds useful behavioral context beyond the annotations: the cdp setup requirement and the returned JSON envelope. There is no contradiction with the annotations.

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 description is front-loaded with the purpose, then gives the action distinctions, cdp prerequisite, and return shape in a compact form. The return-shape line is slightly redundant with the output schema, but it is brief and does not obscure the call guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the annotations and output schema, the description covers the core decision of which action to use and the critical cdp setup requirement. It is complete enough to invoke correctly, though it could add sibling-alternative guidance for a perfect score.

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

Parameters4/5

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

The description adds meaning beyond the action enum by explaining what console and cdp each capture, and it adds the cdp port/setup prerequisite. The schema already documents the individual nested parameters and defaults, though the description does not explain every optional parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: collecting mini-program runtime logs and exceptions. It also distinguishes the two supported capture modes, console and cdp, making the tool clearly separate from siblings like screenshot, navigate, build, and file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly maps console to automator-port console logs and JS exceptions, and cdp to lower-level WXML warnings, render-layer errors, and deprecated API notices. It also gives the cdp prerequisite: open the project with cdp_enabled=true and ensure port 9222 is available. It does not explicitly say when not to use it or name a sibling alternative, so it is not a full 5.

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