Skip to main content
Glama

启动自动化并连接模拟器

wdt_auto_start

Starts a WeChat DevTools automation session by opening the mini program project, enabling the automation port, and connecting over WebSocket so page, query, element, and screenshot tools can run.

Instructions

通过 CLI auto 打开项目并开启自动化端口,然后建立 WebSocket 连接。需要服务端口开启。后续 wdt_current_page / wdt_query / wdt_element / wdt_screenshot 等工具依赖此连接。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "wdt_auto_start"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNo自动化端口,默认 9420
restartNo强制重启自动化;默认复用已连接会话,避免打断现有窗口
timeoutMsNo等待端口与连接的总预算,默认 45000,最大 45000
projectPathNo小程序项目目录;省略时使用 WECHAT_DEVTOOLS_PROJECT

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.5/5.0
Behavior3/5

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

The annotations provide little beyond openWorldHint=false, so the description carries most of the burden. It usefully discloses that the tool launches a project through the CLI and opens a persistent WebSocket session, and that later tools depend on this connection. It does not explain failure behavior, whether a devtools/simulator process is spawned, or what happens when a session already exists (the schema's restart parameter is the only hint).

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

Conciseness4/5

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

Three compact sentences with no filler, and the prerequisite plus dependency information is stated up front. The build and connect sequence is ordered logically.

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?

This is a setup tool with a fully documented schema and no output schema. The description covers the prerequisite and the downstream dependency chain, which is what an agent most needs. Only the return value or session handle and error cases are left implicit.

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 four parameters (port, restart, timeoutMs, projectPath) are already documented with defaults and constraints. The description adds only the general prerequisite that the port must be open, not details for individual parameters, so it meets the baseline rather than exceeding it.

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 specific actions: opening the project through CLI auto, enabling the automation port, and establishing a WebSocket connection. It is clear what the tool does, but it never distinguishes this tool from the sibling wdt_auto_connect, which appears to serve a similar purpose based on its name.

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 statement that the service port must be open and that later tools (wdt_current_page, wdt_query, wdt_element, wdt_screenshot) depend on this connection implies that this tool should run first. However, there are no explicit when-not conditions or guidance on choosing between this tool and wdt_auto_connect or wdt_open.

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