Skip to main content
Glama

在开发者工具中打开项目

wdt_open

Opens or focuses a WeChat mini program project using the official CLI; requires the IDE service port to be enabled.

Instructions

调用官方 CLI 打开(或聚焦)一个小程序项目。需要服务端口开启;登录状态由 IDE 决定。

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_open"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNo可选的 IDE HTTP 服务端口;一般无需传入
projectPathNo小程序项目目录;省略时使用 WECHAT_DEVTOOLS_PROJECT

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the single openWorldHint=false annotation, the description discloses a real prerequisite (the IDE service port must be enabled) and clarifies auth behavior (login state is decided by the IDE, not by this call). It does not cover failure modes or what happens when the IDE is not running, which keeps it below 5.

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?

Two short sentences, front-loaded with the action and followed by the precondition and auth note. Every clause carries information; nothing is padding.

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 zero-required-parameter tool with full schema coverage, no output schema and no nested objects, the description covers purpose, prerequisite, and auth delegation adequately. The remaining gap is what happens on failure or whether it launches the IDE when absent.

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 both optional parameters (port, projectPath) already carry their own documentation, including the WECHAT_DEVTOOLS_PROJECT fallback. The description adds no parameter-level meaning, 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 a specific verb pair (打开/聚焦) and a specific resource (小程序项目) via the official CLI, so an agent can tell it apart from wdt_close_project. It stops short of naming sibling alternatives or stating what happens if the project is already open versus not running.

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?

It gives one meaningful precondition (服务端口开启 must be enabled) but offers no explicit when-to-use versus wdt_auto_connect/wdt_auto_start, nor any when-not guidance. Usage is only implied: call this before other project-scoped operations.

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