Skip to main content
Glama
weapp-driver-mcp

weapp-driver-mcp

by Gao12123

Launch a WeChat mini program session

mp_launch

Launches WeChat DevTools for a Mini Program project through its automation CLI and attaches an automation session, enabling end-to-end testing.

Instructions

Start WeChat DevTools for a project through its automation CLI and attach to it. Launching takes 15-60 seconds and needs DevTools installed, signed in, and with its service port enabled (设置 → 安全设置 → 服务端口). Only one session can run at a time; launching the same project again reuses it. Call mp_close when finished so the DevTools window is closed.

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": {
      "project_path": "<project_path>"
    },
    "name": "mp_launch"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoAutomation port for DevTools. Omit to pick the first free port from 9420. Fails if the given port is already in use.
cli_pathNoPath to the WeChat DevTools CLI. Defaults to /Applications/wechatwebdevtools.app/Contents/MacOS/cli on macOS and the Tencent install path on Windows.
timeout_msNoHow long to wait for DevTools to come up. Defaults to 45000, kept under the 60s request budget most MCP clients apply.
project_pathYesAbsolute path of the mini program project directory (the one containing project.config.json).
trust_projectNoPass --trust-project so DevTools does not ask for confirmation. Only use for projects you trust.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it discloses the expensive 15-60 second launch latency, the external prerequisites including an OS-level setting, the single-session exclusion, and the reuse-on-relaunch behavior. The main remaining gap is what the call returns (session handle, port, or process state) and how failures surface beyond a port conflict.

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?

Four sentences, front-loaded with the action, then latency, then prerequisites, then lifecycle rules. Every sentence carries operational information an agent needs, including the exact menu path for enabling the service port, and nothing is padded.

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?

For a stateful external-process tool with no annotations and no output schema, the definition covers setup, timing, concurrency, idempotency, and cleanup adequately. It falls short only on what the caller receives back, which an agent may need in order to chain into mp_navigate or mp_status.

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?

Schema description coverage is 100%, so all five parameters are already documented in the schema with defaults, ranges, and failure notes. The description adds no parameter-level detail of its own, which matches the baseline 3 when the schema does the heavy lifting.

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?

States a concrete verb and resource: start WeChat DevTools for a project via its automation CLI and attach to it. It also implicitly distinguishes itself from the sibling mp_close by naming that tool as the teardown counterpart, so an agent can place it in the session lifecycle without opening the schema.

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

Usage Guidelines5/5

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

Explicitly states when this tool applies (starting a session for a project), the prerequisites (DevTools installed, signed in, service port enabled with the exact settings menu path), the concurrency rule (one session at a time, same project relaunches reuse it), and the follow-up action (call mp_close when finished).

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