Skip to main content
Glama

工具面装卸(按组按需加载工具)

toolset
Idempotent

Load, unload, or check tool groups in Mdkdebug to control which debugging tools are exposed, reducing context usage.

Instructions

本服务的工具按 11 个组划分,另有一个 nano 极简档(只暴露十几个最短入口),默认只暴露 core 组(调试核心 + 环境引导),其余组用到时现装——这样上下文里只放当前真正用得上的工具描述,工具多的时候这是省上下文的主要手段。action=status 看当前暴露了哪些组、各组多少个、还差什么;action=load 把 toolsets 指定的组装回来(例:toolsets=mem,trace,toolsets=all 一次全装,toolsets=nano 极简);action=unload 把某组收起来(例:toolsets=trace)。可用组与含义:core 调试核心/引导、mem 内存进阶、symbol 符号反汇编、build 编译烧录、serial 串口、advanced 异常/watch/SVD、toolchain 非MDK构建、target 目标档案、ocd OpenOCD、trace SWO/RTT/变量时间线、rtos 任务感知。装卸后工具面立即变化,但很多 MCP 客户端缓存了工具列表:若装完仍报未知工具,先重新拉一次 tools/list 再调。list_tools / get_version / capabilities / toolset 这四个永远保留。小上下文模型:先 tools_groups() 看有哪些组,再 tools_load(group=...) 现装;或直接以 MDKDEBUG_TOOLSETS=nano 启动,只暴露十几个最短入口。 【参数】必填: 无;可选: action, toolsets 【调用示例】{} 【风险】中——会改变目标状态或占用共享资源(调试态/串口/Keil 实例),必要时可回退。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNostatus
toolsetsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare idempotentHint=true, readOnlyHint=false, destructiveHint=false. The description adds valuable context beyond these: the medium-risk note ('会改变目标状态或占用共享资源'), the caching caveat (client tool lists may be stale, re-pull tools/list), and the immediate tool-surface change behavior. This enriches the agent's understanding of side effects and failure modes beyond what annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is information-dense and every section earns its place (group list, caching caveat, small-context model), but it is presented as a long continuous block of text with minimal visual hierarchy. Bold markers help somewhat, yet the density makes it hard to scan quickly. It would benefit from bullet points or clearer section separation while retaining the same content.

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

Completeness4/5

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

An output schema exists, so return-value documentation is not required. For a metadata/config tool of this complexity, the description is thorough: it covers available groups, action semantics, caching workaround, always-retained tools, and the nano startup path. Minor gaps remain around explicit response format and the distinction from tools_load, but nothing critical is missing for correct invocation.

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?

Schema description coverage is 0% and the two parameters have no enums or descriptions. The description compensates fully: it explains action=status/load/unload with concrete examples (toolsets=mem,trace, toolsets=all, toolsets=nano) and enumerates all valid group values with meanings. The agent can invoke this tool correctly without any additional parameter documentation.

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 states a specific purpose: dynamically load/unload tool groups to manage context, listing all 11 groups plus the nano profile. It clearly differentiates the core concept (group-based tool surface management) from siblings by explaining the default-core-then-load-on-demand model, and explicitly names the always-retained tools (list_tools / get_version / capabilities / toolset). The verb-resource pair (load/unload groups) is precise and distinguishes it from tools_load and tools_groups.

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

Usage Guidelines3/5

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

The description explains the overall model (default core group, load others when needed) and the small-context pattern, referencing tools_groups() and tools_load() as alternatives. However, it creates ambiguity: the small-context section recommends using tools_load() for loading while this tool itself supports action=load, without explicitly stating when to prefer one over the other. Context is present but exclusions/alternatives are not crisply delineated.

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