Skip to main content
Glama

restart_keil

Destructive

Restart Keil and rebuild debug connection: closes all instances, relaunches project, waits for UVSOCK, resets link. Turns manual restart of dead/dirty sessions into a single call.

Instructions

一键重启 Keil 并重建调试通道:关闭所有 Keil 实例 → 以脱离父进程的方式重新拉起并打开工程 → 等待 UVSOCK 端口监听 → 重置连接。把「Keil 死了 / 会话脏了只能人工关掉再开」整条恢复流程变成一次调用。project 为 .uvprojx 路径(省略用默认工程);force=True 直接强制结束残留实例;wait_ready 为等待 UVSOCK 监听的秒数(默认 20)。返回各阶段结果与最终健康快照。注意:会关闭所有 Keil 实例(含人工查看中的窗口),未保存的调试会话/源码改动可能丢失,调用前请确认。 【参数】必填: 无;可选: project, force, wait_ready 【调用示例】{} 【风险】高——不可逆:会改写目标 Flash/内存,或关闭/重启用户的 Keil 实例。执行前确认目标与工程正确。 【参数别名】project ← path/proj/project_file/project_path/uvprojx;force ← hard/kill;wait_ready ← wait/wait_uvsock。规范名以上方【参数】行为准;未列出的参数名会被拒绝,不会静默忽略

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
projectNo
wait_readyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses several behaviors beyond the destructiveHint annotation: it closes ALL Keil instances, including windows the user may be viewing, and warns that unsaved debug sessions or source changes may be lost. It also details the relaunch process (detached from parent process) and the UVSOCK wait mechanism, plus it states the return of phase results and a final health snapshot. This goes well beyond simply saying 'destructive' and gives the agent a precise mental model of side effects.

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 thorough and well-structured, starting with the main purpose and then breaking down the workflow, parameters, risk, and aliases. It is longer than a typical description but every section adds essential operational detail. The front-loading of the core purpose and the use of labeled sections (【参数】, 【风险】, 【参数别名】) make it scannable. It is slightly verbose but not wasteful.

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—it orchestrates multiple steps and has destructive side effects—the description covers all necessary aspects: the actions performed, the parameters, the return behavior, the risks, and the aliases. The presence of an output schema reduces the burden of describing return values, and the description still states what it returns ('各阶段结果与最终健康快照'). An agent has enough information to call it correctly and safely.

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 input schema provides no descriptions (coverage 0%), so the description carries the full burden. It explains each parameter: 'project 为 .uvprojx 路径(省略用默认工程)', 'force=True 直接强制结束残留实例', and 'wait_ready 为等待 UVSOCK 监听的秒数(默认 20)'. It also lists parameter aliases, preempting naming mismatches. This fully compensates for the schema's lack of detail.

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's purpose: '一键重启 Keil 并重建调试通道' (restart Keil and rebuild debug channel). It enumerates the exact sequence of actions (close all instances, relaunch with project, wait for UVSOCK, reset connection) and explains that it packages the entire recovery workflow into one call. This is specific and distinguishes it from siblings like close_uvision, launch_uvision, and reset_connection, which each handle only a portion of the process.

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?

The description provides context on when to use: '把「Keil 死了 / 会话脏了只能人工关掉再开」整条恢复流程变成一次调用' – i.e., when Keil is dead or the session is dirty. It also warns about destructive effects (closing all instances, losing unsaved changes), which informs the decision to avoid using it casually. However, it does not explicitly name alternative tools or state when NOT to use it in favor of more granular operations (e.g., reset_connection for a simple reset). The guidance is clear but not explicitly comparative.

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