Skip to main content
Glama

keil_health

Read-onlyIdempotent

Check Keil debug health: verify UV4 process, UVSOCK port, and modal dialogs. Diagnose timeouts by identifying whether Keil is not running, port not listening, or port occupied—with actionable suggestions.

Instructions

检查 Keil 调试通道的健康状态:UV4 进程是否存在、UVSOCK 端口是否监听、是否有模态对话框阻塞。返回 keil_alive / uv4_pids / port / port_listening / uvsock_ready / code / diagnosis / suggestion;mdkdebug_instances 给出串行化方式、并发竞争遥测(等待次数/最长等待/锁超时)与其他仍在驱动同一 UVSOCK 的 mdkdebug 进程(多个实例并存会互相穿插、静默吃掉写入,这是最隐蔽的一类故障);检测到 Keil 模态框时一并给出modal_dialogs[{title, message, button_texts}]——正文与可点按钮都有,知道框里写了什么、该点哪个(配套 dismiss_dialog 直接关框,不必再去界面手点)。用途:命令超时或「操作了没反应」时先调它,直接看清断在哪一环(keil_not_running / port_not_listening / port_occupied),而不是干等到超时;也可作为操作前后的廉价自检(纯 ctypes + socket 探测,Keil 未运行时也能正常返回)。 【参数】无(直接调用) 【调用示例】{}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark it read-only/idempotent/non-destructive, and the description adds meaningful operational facts: it is a pure ctypes+socket probe, safe even when Keil is absent, and it surfaces concurrency hazards from multiple mdkdebug instances that silently eat writes. It also details modal dialog output content, going well beyond annotation hints.

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 long but front-loaded with the main check purpose and then layers return fields, failure modes, and usage guidance. Each section adds non-redundant operational value, with an explicit parameter note and example at the end.

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?

For a no-parameter health probe with annotations and an output schema, the description covers the diagnostic fields (including mdkdebug_instances contention data and modal_dialogs), the precise failure modes, and when to invoke it. There is no missing information an agent would need to select and call it 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 tool has zero parameters and the schema is empty; the description explicitly states 【参数】无(直接调用) and shows an empty call example. This removes any doubt that invocation requires no arguments, so the description is fully sufficient.

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 opens with a specific verb and resource ('检查 Keil 调试通道的健康状态') and enumerates exactly what is probed: UV4 process, UVSOCK port, and modal dialog blocking. It distinguishes itself from generic siblings by defining its scope as health/diagnosis of the debug channel rather than command execution or environment setup.

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?

It gives explicit trigger conditions: call first when a command times out or appears unresponsive, and use as a cheap pre/post-operation self-check. It also clarifies that it remains useful even when Keil is not running, but it does not name exclusions or alternative sibling tools, so a 4 rather than 5.

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