Skip to main content
Glama

close_uvision

Destructive

Closes Keil uVision instances to end debug sessions. Use keep to retain only the latest or oldest instance, or filter by project. Force terminates unresponsive processes.

Instructions

关闭 Keil uVision 实例,配合 launch_uvision 实现 Keil 开关闭环。keep="all"(默认)关闭全部实例;keep="latest" / "oldest" 只保留一个实例(最新 / 最早启动的那个),其余关闭——用于把累积的多个同工程窗口收敛成一个,只开一个窗口调试。project 非空时只处理打开该工程的实例。force 默认 False:先优雅关闭(发送关闭消息),残留则自动强制终止;force=True 直接强制结束。返回 closed / kept / total_before / remaining。注意:会关闭 Keil 窗口(含人工查看中的),调用前确认无需保留。强制终止后立即重取进程列表可能短暂误报残留(本工具已轮询等待)。沙箱环境受权限/跨会话限制可能无法关闭,需在真实运行环境使用。 【参数】必填: 无;可选: force, keep, project 【调用示例】{} 【风险】高——不可逆:会改写目标 Flash/内存,或关闭/重启用户的 Keil 实例。执行前确认目标与工程正确。 【参数别名】force ← hard/kill;project ← path/proj/project_file/project_path/uvprojx;keep ← keep_one/keeponly/retain。规范名以上方【参数】行为准;未列出的参数名会被拒绝,不会静默忽略

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keepNoall
forceNo
projectNo

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?

Rich disclosure well beyond the annotations: warns that windows under manual viewing will be closed, details the graceful-close-then-force-terminate fallback flow for force=False, explains the polling wait to avoid false residue reports, flags sandbox permission/cross-session limitations, and labels the operation irreversible in the risk section. No contradiction with destructiveHint=true.

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 core purpose is front-loaded and the flow from purpose to parameter behavior to return values is logical. The main paragraph is dense, and the risk section slightly repeats the window-closing warning already stated earlier. The call example is empty ({}), a minor missed opportunity given the parameter modes, but overall structure is organized and nearly all sentences earn their place.

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?

Complete for a high-risk, mult-mode tool: covers all three optional parameters, return values (closed/kept/total_before/remaining, backed by an output schema), side effects on user-visible windows, edge cases (false residue after force kill), irreversible risk, and environment constraints. Nothing an agent needs to call it correctly is missing.

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?

With 0% schema description coverage, the description carries the full burden and compensates thoroughly: it explains the three keep values and their intent, force's default false→graceful→force escalation, and project's instance filtering. It also documents parameter aliases (force←hard/kill, project←path/proj/..., keep←keep_one/...) that help agents map variant names correctly.

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 and resource ('Close Keil uVision instances') and explicitly pairs with launch_uvision to form a Keil on-off closed loop, which distinguishes it from its primary sibling. The keep semantics (all/latest/oldest) and project filtering make the exact scope unmistakable.

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?

Explains when each keep mode should be used (converging accumulated same-project windows into one debug window) and when project-filtering applies. Names launch_uvision as the counterpart. It does not explicitly enumerate exclusions versus other siblings (e.g., restart_keil), but the pair relationship with launch_uvision gives sufficient routing context.

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