Skip to main content
Glama
weapp-driver-mcp

weapp-driver-mcp

by Gao12123

Close the mini program session

mp_close

Detach from the running WeChat Mini Program and close the DevTools window launched by the server. Safe to call without an active session, returning not_running instead of failing.

Instructions

Detach from the mini program and close the DevTools window this server launched. Idempotent: calling it with no session reports "not_running" instead of failing.

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": "mp_close"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose a concrete behavioral trait: it is idempotent and returns 'not_running' rather than throwing when no session exists, which prevents the agent from adding defensive checks. It does not say whether unsaved state in the mini program is discarded or whether other in-flight sessions are affected, leaving some mutation semantics unstated.

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, zero padding, with the core action front-loaded and the idempotency caveat second. Every clause carries information the agent needs.

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-parameter, no-output-schema lifecycle tool with no annotations, the definition covers action, ownership scope, and failure behavior, which is enough to invoke it correctly. Minor gap: no statement of what remains after closing (e.g. whether the session binding is fully cleared) that would help an agent decide what to do next.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is no per-parameter meaning the description could add. Baseline 4 applies; nothing is missing or misleading.

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?

States a specific verb+resource pair ('Detach from the mini program and close the DevTools window') and scopes ownership with 'this server launched', which implicitly distinguishes it from the launch-side sibling mp_launch. An agent can tell exactly what teardown action this performs.

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?

Usage is clear from the lifecycle framing: this is the teardown counterpart to launching a session, and the 'this server launched' qualifier tells the agent not to expect it to close externally started DevTools. It stops short of an explicit when-to-use/when-not statement (e.g. whether to call before or after mp_launch again).

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