Skip to main content
Glama

构建小程序 npm

wdt_build_npm

Runs the official CLI build-npm command to build a WeChat mini program's dependencies, optionally targeting a specified project directory.

Instructions

调用官方 CLI 执行 build-npm,构建项目依赖。

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

Input Schema

NameRequiredDescriptionDefault
projectPathNo小程序项目目录;省略时使用 WECHAT_DEVTOOLS_PROJECT

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It discloses the mechanism (official CLI build-npm) but not the side effects — that build output is written into the project's npm build directory, whether an open project is required, whether the operation is long-running or blocking, or how failures surface.

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?

A single short sentence with no waste, front-loading the mechanism and the purpose. It is efficient but too brief to carry any of the behavioral context a build command needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a build/mutation tool with no annotations and no output schema, the definition should say what is produced and what preconditions exist. The parameter is well documented in the schema, but the description leaves out the effect of the build and any requirement that DevTools be connected to a project.

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?

The single parameter projectPath has 100% schema description coverage including the WECHAT_DEVTOOLS_PROJECT fallback, so the schema already does the work. The description adds no parameter meaning beyond that, which is the baseline for high schema coverage.

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 a concrete verb and resource: it runs the official CLI's build-npm command to build project dependencies, which maps directly to the tool name wdt_build_npm. No sibling tool in the list performs a build, so no explicit differentiation is required, but the description stops short of naming the target output.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus other workflows, no prerequisites (e.g., that WeChat DevTools must be running or that npm dependencies must already be installed), and no exclusions. The purpose implicitly suggests its use, but no guidance is offered.

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