Skip to main content
Glama

生成小程序预览二维码

wdt_preview

Generates a WeChat Mini Program preview through the official DevTools CLI and can save the QR code as an image or base64 output; requires an authenticated session.

Instructions

调用官方 CLI 生成预览。qrFormat=image/base64 时可把二维码写入 qrOutput。需要已登录。

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

Input Schema

NameRequiredDescriptionDefault
qrFormatNo
qrOutputNo二维码图片输出路径(qrFormat 为 image/base64 时建议填写)
infoOutputNo预览信息 JSON 输出路径
projectPathNo小程序项目目录;省略时使用 WECHAT_DEVTOOLS_PROJECT

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

B3.4/5.0
Behavior3/5

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

With only openWorldHint=true supplied, the description does add real context: it invokes the official CLI and requires an authenticated session, which is valuable pre-call information. It does not, however, disclose side effects, whether the call blocks until the QR is ready, or what is returned when qrFormat=terminal, leaving the behavioral picture partial.

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, front-loaded with the action, then the output-path interaction, then the prerequisite. No filler, though the phrasing is terse enough that the qrFormat/qrOutput clause reads like a restatement rather than new information.

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?

For a no-output-schema tool with four optional params, the description covers the login prerequisite and where output lands but never says what a successful call yields (a QR? a URL? console text?) or how long generation takes. That return-value gap is the main missing piece given there is no output schema to fall back on.

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 coverage is 75%, so the schema already documents qrOutput, infoOutput, and projectPath, and indeed the description's note about qrFormat=image/base64 writing to qrOutput largely repeats qrOutput's own schema text. It adds nothing on qrFormat's third 'terminal' value or the default behavior of projectPath (WECHAT_DEVTOOLS_PROJECT), so it neither compensates nor subtracts — the baseline 3 holds.

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 states 调用官方 CLI 生成预览 (invoke official CLI to generate a preview), giving a specific verb and resource, and the title confirms this is QR code preview generation. It is clearly distinguishable from siblings like wdt_upload or wdt_build_npm, though it never explicitly contrasts itself with them.

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 prerequisite — 需要已登录 (must be logged in), which points an agent toward wdt_login/wdt_is_login first. However, it offers no explicit when-to-use or when-not guidance versus alternatives such as wdt_upload (submission) or wdt_auto_start, leaving the routing implied.

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