Skip to main content
Glama

上传小程序版本(默认禁用)

wdt_upload
Destructive

Uploads a mini program version to the WeChat backend via the official CLI. Requires explicit confirm=true and upload allowlist; publishing is irreversible.

Instructions

调用官方 CLI 上传版本到微信后台。默认禁用;仅在 WECHAT_DEVTOOLS_MCP_ALLOW_UPLOAD=1 且 confirm=true 时执行。此操作会发布版本,不可撤销。

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": {
      "version": "<version>",
      "desc": "<desc>"
    },
    "name": "wdt_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
descYes版本描述
confirmNo必须显式传 true 才会执行上传
versionYes版本号,如 1.0.0
projectPathNo小程序项目目录;省略时使用 WECHAT_DEVTOOLS_PROJECT

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.4/5.0
Behavior5/5

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

The annotations already declare destructiveHint=true and openWorldHint=true, and the description reinforces this by stating the upload publishes a version and cannot be undone. It adds operational context the annotations cannot express: the environment-variable gate and the confirm flag requirement. 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 three short sentences with no wasted wording, and the most important constraint (disabled by default) is front-loaded before the gate conditions and the irreversibility warning.

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 destructive, gated mutation tool, the description covers purpose, safety conditions, and irreversibility, which is the critical information. Because no output schema exists, it could say more about what a successful upload returns, such as an upload id or version identifier; this is a minor gap.

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 version, desc, confirm, and projectPath are already documented, including the WECHAT_DEVTOOLS_PROJECT fallback. The description only restates the confirm gating, adding no new meaning beyond the schema. A baseline of 3 is appropriate 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?

The description states a specific verb and resource: invoking the official CLI to upload a mini-program version to the WeChat backend. This is clearly distinct from sibling tools like wdt_preview or wdt_build_npm, which do not publish a version.

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?

The description gives an explicit precondition: the operation is disabled by default and runs only when WECHAT_DEVTOOLS_MCP_ALLOW_UPLOAD=1 and confirm=true. It also warns that the operation is irreversible. It does not name an alternative tool to use instead, but the gating conditions are unambiguous.

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