Skip to main content
Glama

清除断点

clear_breakpoint
Idempotent

Remove a breakpoint by expression, internal ID, or Keil number. Resolves symbols to Keil IDs for reliable deletion, with fallback to address-based clearing.

Instructions

清除断点。三种指定方式(任选其一):expr 传符号/地址;bp_id 传本服务内部 id;keil_number 传 Keil 界面/命令窗口 BL 里的真实断点编号。清除走命令窗口 BK:数据观察点按地址清不掉(BK <地址> 时 UVSOCK 回成功、窗口却报 error 72 invalid item number),必须按编号清除,故内部会自动把地址/符号解析成 Keil 编号再 BK <编号>,解析不出才回退按地址。bp_id 在本服务内无此 id 时会自动改按 Keil 真实编号处理并给出 note,不必再用 clear_all_*(hard=true) 一刀切。注意:清除断点同样走命令窗口并触发异步消息,清除后立即 run/step 前建议稍等。需已进入调试。 【参数】必填: 无;可选: expr, bp_id, keil_number 【调用示例】{} 【风险】中——会改变目标状态或占用共享资源(调试态/串口/Keil 实例),必要时可回退。 【参数别名】expr ← addr/address/expression/func/function/keyword/location/name/pattern/pc/query/symbol/target/var/variable;bp_id ← bp/breakpoint_id/id;keil_number ← keil_id/keil_no/num/number。规范名以上方【参数】行为准;未列出的参数名会被拒绝,不会静默忽略

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprNo
bp_idNo
keil_numberNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses critical behavioral details: the clearing happens via the BK command, data watchpoints cannot be cleared by address due to a Keil error, the tool automatically converts address/symbol to a Keil number with a fallback, unknown bp_id values trigger automatic fallback, and clearing triggers async messages. This is substantial transparency with no contradiction to annotations.

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 long but densely packed with necessary edge-case knowledge. The first sentence front-loads the purpose, and the structure separates usage, risk, and aliases. The empty call example '{}' is a small waste, and the risk section partly echoes annotation information, but overall each segment earns its 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?

The description covers all critical context: required debug state, all parameter modes, the watchpoint-clearing bug, automatic fallbacks, asynchronous message behavior, and a risk rating. Given that an output schema exists, no return-value description is needed, and there are no obvious gaps that would prevent an agent from invoking the tool 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?

Since schema description coverage is 0%, the description carries the full burden, and it delivers: it defines each parameter (expr for symbol/address, bp_id for internal service id, keil_number for Keil's actual breakpoint number), explains the fallback semantics, and documents parameter aliases while noting that unspecified names are rejected. This completely compensates for the bare schema.

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 verb and resource: '清除断点' (clear breakpoint), and goes further by explaining the three ways to specify which breakpoint to clear. It distinguishes itself from the sibling clear_all_breakpoints by framing this as a targeted clear operation and explicitly advising against using clear_all_* for a single breakpoint.

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 gives explicit usage guidance: three selection modes (expr, bp_id, keil_number), the prerequisite that debug must be entered, and a warning about async messages before issuing run/step. It also names the alternative clear_all_breakpoints and explains when not to use it (for a single breakpoint), making the choice between tools unambiguous.

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