Skip to main content
Glama
yfmeii

WeChat Mini Program Dev MCP

by yfmeii

mp_ensureConnection

Verify the mini program automation session is ready. Use before screenshot, page, or element operations. On failure, retry with reconnect=true or pass projectSelection if prompted.

Instructions

检查小程序自动化会话是否就绪。先调用这个工具,再调用 mp_screenshot、page_* 或 element_* 工具。若失败,优先用 reconnect=true 重试一次;若返回项目选择提示,则传 projectSelection。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionNo
reconnectNo
projectSelectionNo
Behavior4/5

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

Although no annotations are provided, the description discloses the tool's main behavior (checking readiness) and failure modes (retry with reconnect, project selection handling). It lacks details on side effects or what happens on success, but the disclosed behaviors are sufficient for basic usage.

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 sentences, the first clearly stating purpose and prerequisite order, the second detailing failure handling. No redundant information, front-loaded, and efficiently communicates key points.

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?

Given the complexity (nested connection object, no output schema, no annotations), the description is incomplete. It does not explain the connection parameters or what 'ready' means in terms of output. The tool is critical for session setup but leaves significant ambiguity about its inputs and results.

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

Parameters2/5

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

The schema has 0% description coverage, so the description must compensate. It mentions reconnect and projectSelection, but the main connection object (with 15 properties) is not explained. The agent gets partial semantics for two parameters, but the core input remains opaque.

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 clearly states the tool checks if the mini-program automation session is ready, using the verb '检查' (check) on the resource '会话' (session). It further differentiates itself by specifying it's a prerequisite for screenshot, page_, and element_ tools.

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

Usage Guidelines5/5

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

The description explicitly instructs to call this tool first before others, and provides specific failure handling: retry with reconnect=true for general failure, and pass projectSelection if a project selection prompt appears. This gives clear when-to-use and alternative actions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yfmeii/weapp-dev-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server