Skip to main content
Glama

mp_healthCheck

Aggregate read-only health status of the automation environment, including connections, page, logs, and screenshot results, to determine if connection recovery is required.

Instructions

只读聚合当前自动化环境健康状态:连接(devtoolsOnline / wsReachable / automatorConnected)、当前页面路由、项目、日志监听、以及上次 mp_screenshot 结果(lastScreenshotOk / errorCode)。不修复任何东西——要恢复用 mp_recoverConnection,要建立连接用 mp_ensureConnection。

何时用:操作出问题时先调它看全局状态;尤其在 mp_screenshot / page_snapshot 反复失败后,先 healthCheck 再决定是否 mp_recoverConnection。 关键字段:summary='degraded' 表示至少一项能力降级,但不一定可通过重连修复;只有 needsRecovery=true 才调 mp_recoverConnection。连接全绿但 lastScreenshotOk=false 时会返回 summary='degraded' + needsRecovery=false,说明是截图通道降级,不要循环重连。

serverVersion 是本 MCP server 的版本号(不是小程序版本、不是基础库版本、不是开发者工具版本),反馈/调试时带上它即可。

参数:includePage=true 额外探当前路由,includeLogs=true 额外查日志监听状态(都默认 true;探测失败只会进 warnings,不影响其余字段)。connection 可选,覆盖默认连接参数。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionNo可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。
includeLogsNo
includePageNo
Behavior5/5

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

With no annotations, the description fully discloses behavior: it is read-only, does not fix anything, explains key fields like needsRecovery, and warns about serverVersion meaning. It also mentions potential warnings from failed probes. This sets clear expectations.

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?

The description is fairly long but well-structured with sections. It front-loads the essential purpose and usage. While every sentence adds value, some redundancy exists (e.g., repeating '不修复任何东西'). Could be slightly tighter, but still effective.

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

Completeness5/5

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

Given the tool's complexity (health check with multiple fields) and no output schema, the description thoroughly explains return fields (summary, needsRecovery, lastScreenshotOk, etc.), edge cases (degraded but no recovery), and parameter behavior. It is complete for an agent to use correctly.

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

Parameters5/5

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

The description adds significant meaning beyond the schema. It explains the default values and effects of includeLogs and includePage, and details the connection parameter including the port warning. Schema coverage is low (33%), but the description compensates fully.

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 it is a read-only aggregation of automation environment health status, listing specific components it checks (connections, page route, project, logs, last screenshot result). It distinguishes from sibling tools like mp_recoverConnection and mp_ensureConnection by stating it does not fix anything.

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 provides explicit when-to-use guidance: '操作出问题时先调它看全局状态' and after repeated screenshot failures. It also clarifies when not to use mp_recoverConnection (only when needsRecovery=true) and warns against looping reconnect. This is comprehensive.

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/Chaixueyuan/weapp-agent-mcp'

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