Skip to main content
Glama

暂停执行(含停止确证)

stop
Idempotent

Pause target MCU execution to enable safe memory, register, and expression reads, with optional verification and watchdog freeze.

Instructions

暂停目标 MCU 的执行(进入断点/挂起状态),此时才可安全读内存/寄存器/表达式。停止是异步生效的:命令返回不代表目标已停(真机实测 stop 回 ok 后紧跟的 get_status 仍报"执行中"),这期间读到的内存/寄存器可能是脏值或陈旧值。本工具默认在 stop 之后轮询确认(verify=true),返回 stopped / stop_verified / waited_ms / state_after_stop:stop_verified=false 表示没能确证目标已停,此时不要读内存/寄存器、也不要据其下结论,可重试 stop 或稍后再读(与 run_timeout 的 stop_verified 同一口径)。verify=false 则只发命令不做确认(快,但需自行承担读到脏值的风险)。看门狗防御(真机踩过):暂停期间目标虽不跑代码,看门狗(IWDG)仍在计数——新会话/复位后 DBGMCU 冻结位会被清零,halt 超过溢出时间就被复位、RAM 现场全丢。本工具默认在 stop 后自动置位 DBGMCU 的 IWDG/WWDG 冻结位(freeze_watchdogs=true),返回 watchdog_freeze 字段供核对(含 all_frozen);不需要可传 freeze_watchdogs=false。 【参数】必填: 无;可选: verify, timeout, freeze_watchdogs 【调用示例】{} 【风险】中——会改变目标状态或占用共享资源(调试态/串口/Keil 实例),必要时可回退。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
verifyNo
timeoutNo
freeze_watchdogsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description reveals critical runtime behavior: stop is asynchronous, verification is polled by default, unverified stops may yield stale/dirty values, and watchdog freeze bits are managed to prevent reset during halt. This is substantial context beyond idempotentHint/readOnlyHint.

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 organized with bolded warnings and sectioned parameter/risk notes. It front-loads the core purpose and then layers necessary caveats. Some repetition and extra detail could be trimmed, but most content earns its place for a tool with async and watchdog behavior.

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 the main action, async semantics, verification failure protocol, watchdog risks, default parameters, return field names, and risk level. It is sufficient for an agent to call the tool correctly and avoid unsafe memory reads.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds real meaning for verify and freeze_watchdogs, including defaults, consequences, and return implications. However, timeout appears only in the parameter list and schema default, with no explanation of its unit or effect. Given schema description coverage is 0%, this is a noticeable gap.

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 precise statement: '暂停目标 MCU 的执行(进入断点/挂起状态)' and connects it to safe memory/register/expression reads. This clearly distinguishes it from sibling operations like run, step, or reset, and from read-type tools.

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?

It explicitly says when to use stop (before safe memory/register reads) and when not to proceed ('stop_verified=false 此时不要读内存/寄存器'). It also gives alternatives: retry stop, read later, and references run_timeout's same stop_verified convention.

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