Skip to main content
Glama
phryniszak

stm32-stlink-mcp

by phryniszak

stm32-stlink-mcp

用于通过 ST-LINK 调试 STM32 微控制器的 MCP 服务器,基于 STMicroelectronics 自家的 STM32CubeCLT 工具集构建——ST-LINK_gdbserver、STM32_Programmer_CLI 和 arm-none-eabi-gdb(通过 GDB/MI2 驱动)。不涉及 OpenOCD、J-Link 或 probe-rs。

架构

调试会话由一对子进程组成,精确复刻 ST 官方文档描述的工作流程(UM2576,"STM32CubeIDE ST-LINK GDB server"):

 arm-none-eabi-gdb  --interpreter=mi2  --(TCP, target extended-remote)-->  ST-LINK_gdbserver  --(USB)-->  ST-LINK  --(SWD)-->  STM32

arm-none-eabi-gdb 以 MI2 模式驱动,因此服务器无需自行实现 GDB 远程串行协议,即可免费获得源码级单步、符号断点和符号感知的表达式求值。ST-LINK_gdbserver 在会话生命周期内持有探针的 USB 句柄;通过 gdb 的 load(MI:-target-download)进行的烧录由服务器透明地委托给 STM32CubeProgrammer,因此重新烧录无需拆除会话。独立的一次性烧录(flash_standalone,无需会话)直接调用 STM32_Programmer_CLI,因此会与同一探针上已打开的会话冲突——请参阅工具描述。

Related MCP server: dbgprobe-mcp-server

安装

npm install
npm run build

需要安装 STM32CubeCLT 并确保其 bin/ 目录可访问——要么已经位于 PATH 中(CLT 安装程序默认会这样做),要么通过 STMCP_CUBECLT_PATH / 按工具的覆盖路径指定。运行 npm run doctor 进行检查。

运行

node dist/index.js serve     # starts the MCP server on stdio (default mode)
node dist/index.js doctor    # pre-flight check: tool resolution, connected probes, udev rules
node dist/index.js doctor --json

向 MCP 客户端注册

{
  "mcpServers": {
    "stm32-stlink": {
      "command": "node",
      "args": ["<path-to-this-repo>/stmcp/dist/index.js"]
    }
  }
}

配置(环境变量)

变量

默认值

用途

STMCP_GDBSERVER_PATH / STMCP_PROGRAMMER_CLI_PATH / STMCP_ARM_GDB_PATH

—

单个二进制文件的覆盖路径(优先级最高)

STMCP_CUBECLT_PATH

—

CubeCLT 安装根目录;子路径通过 STM32CubeCLT_metadata.sh -j 解析

STMCP_STLINK_SERIAL

—

默认探针序列号(省略时,若仅连接一个探针则自动选择)

STMCP_DEFAULT_DEVICE

STM32G431CBTx

默认 MCU 设备字符串

STMCP_DEFAULT_INTERFACE

swd

swd 或 jtag

STMCP_DEFAULT_FREQUENCY_KHZ

4000

SWD/JTAG 时钟频率

STMCP_MAX_SESSIONS

1

并发调试会话上限

STMCP_GDBSERVER_READY_TIMEOUT_MS

8000

等待 "Waiting for debugger connection..." 的超时时间

STMCP_LOG_LEVEL

info

error | warn | info | debug

STMCP_LOG_FILE

—

可选日志文件(无论如何都会使用 stderr——stdout 保留给 MCP 帧)

STMCP_ALLOW_FLASH_ERASE

false

启用擦除路径

STMCP_ALLOW_MEMORY_WRITE

true

启用 memory_write

STMCP_ALLOW_FLASH_ADDRESS_WRITE

false

允许 memory_write 以 flash 地址窗口为目标(通常被阻止——请改用 flash 工具)

STMCP_ALLOWED_FILE_PATHS

(不受限制)

用于 ELF/bin 文件参数的逗号分隔白名单根目录

STMCP_MAX_FILE_SIZE_BYTES

16777216

文件参数的最大大小

STMCP_FLASH_RANGE_START / STMCP_FLASH_RANGE_END

0x08000000 / 0x08020000

写入保护的 flash 地址窗口(默认:128KB,STM32G431CB)

工具

领域

工具

用途

探针

list_probes

列出已连接的 ST-LINK 探针

会话

debug_connect

启动 gdbserver+gdb,加载 ELF 符号,连接

会话

debug_disconnect

干净地拆除会话

会话

debug_session_status

会话信息(单个或全部)

烧录

flash_standalone

通过 STM32_Programmer_CLI 进行一次性烧录,无需会话

烧录

flash_load_in_session

在已打开的会话中通过 gdb load 重新烧录

执行

debug_run

恢复/继续

执行

debug_halt

中断

执行

debug_reset

复位(monitor reset [halt])

执行

debug_step

单步跳过/进入/跳出

断点

breakpoint_set / breakpoint_clear / breakpoint_list

按 file:line、符号或 *addr

内存

memory_read / memory_write

原始内存访问(写入受保护)

寄存器

register_read / register_write

按名称访问的核心寄存器

寄存器

read_fault_registers

一次调用即可转储 Cortex-M SCB 故障寄存器(CFSR/HFSR/... 已解码)

表达式

evaluate_expression

通过 gdb MI 进行符号感知的求值

推迟到 v2

SVD 外设寄存器工具(memory_read/write + evaluate_expression 已经可以通过地址访问一切)、实时/流式内存轮询、插件系统、按芯片划分的内存区域白名单、任意 gdb monitor 透传,以及选项字节/RDP 工具(可能导致变砖,有意不在范围内)。

RTT

RTT(SEGGER 实时传输——实时、不暂停内核的控制台/变量跟踪)有意不在此服务器中实现。ST-LINK_gdbserver 的 GDB/MI 存根没有非停止模式,因此通过此服务器的 debug_connect 会话读取内存需要先暂停内核——这违背了 RTT 的目的。正确的机制是永不暂停内核的直接 AP 内存访问(通过阅读 ST 自家的 STM32CubeMonitor 源码确认,它正是使用这种方式,STM32_Programmer_CLI 的 -r32fast 也是如此)。

这正是 strtt 已经实现的功能,strtt-mcp 将其封装为独立的 MCP 服务器(strtt_start/strtt_stop/strtt_status/strtt_read/strtt_write)。请将其与此服务器并列注册,而不是通过它注册:

{
  "mcpServers": {
    "stm32-stlink": { "command": "node", "args": ["<...>/mcp-server/dist/index.js"] },
    "strtt": {
      "command": "node",
      "args": ["<path-to-strtt-repo>/mcp/dist/index.js"],
      "env": { "STRTT_BIN": "<path-to-strtt-binary>" }
    }
  }
}

使用 tcp: true 启动 strtt_start,通过共享的 ST-LINK Server 连接,而不是直接占用 USB 设备——这样它就可以与此处打开的 debug_connect 会话并发运行,因为 GdbServerProcess 总是将 -t/--shared 传递给 ST-LINK_gdbserver。如果不使用 tcp: true,strtt 和已打开的调试会话将争用同一个探针。

硬件验证手册

连接好 ST-LINK 和目标板后:

node dist/index.js doctor                     # confirm probe + tools resolve
npx @modelcontextprotocol/inspector node dist/index.js   # interactive tool testing

然后,通过检查器或 MCP 客户端:

  1. list_probes → 探针的序列号会出现。

  2. debug_connect { elfPath, device, interface: "swd", serial } → 返回一个 sessionId。

  3. breakpoint_set { sessionId, location: "main" } → 返回一个断点编号。

  4. debug_run { sessionId } → 以 reason: "breakpoint-hit" 暂停。

  5. register_read { sessionId, registers: ["pc","sp","lr","r0"] }。

  6. evaluate_expression { sessionId, expression: "<a known global>" }。

  7. read_fault_registers { sessionId } → 复位后标志为良性/零值。

  8. debug_disconnect { sessionId } → 确认没有孤儿进程:ps aux | grep -E 'ST-LINK_gdbserver|arm-none-eabi-gdb'。

  9. flash_standalone { file, reset: "hard", run: true },且没有打开的会话。

  10. 负向测试:打开一个会话,然后在同一序列号上调用 flash_standalone → 预期返回 DEVICE_BUSY。

注意: debug_connect 会暂停目标 CPU。如果电路板正在主动驱动执行器/输出,且意外暂停可能不安全,请勿在未事先确认可行的情况下连接。

Available Tools

19 tools
breakpoint_clearClear a breakpointA

Deletes a previously set breakpoint by its number.

ParametersJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
breakpointNumberYesBreakpoint number as returned by breakpoint_set

TDQS

A3.9/5.0
Behavior3/5

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

No annotations, description indicates destructive delete but lacks details on side effects like persistence or error handling.

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

Conciseness5/5

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

Short, clear, single sentence with no unnecessary words.

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?

Sufficient for a simple delete operation, but could mention success/failure or that it removes from the breakpoint list, though not critical.

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

Parameters2/5

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

SessionId is not described in the schema or the tool description; breakpointNumber has a schema description referencing breakpoint_set, but the tool description adds little. Coverage is 50% and description does not compensate for the missing sessionId context.

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?

Description clearly states the action (deletes) and the resource (breakpoint) and specifies the method (by number), distinguishing it from set and list tools.

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?

Implies usage when a previously set breakpoint needs to be removed, but does not explicitly contrast with other tools or state prerequisites, though it's evident.

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

breakpoint_listList breakpointsA

Lists breakpoints currently tracked on a session (those set via breakpoint_set).

ParametersJSON Schema
NameRequiredDescriptionDefault
sessionIdYes

TDQS

A3.5/5.0
Behavior3/5

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

Without annotations or an output schema, the description carries the burden of behavioral disclosure. It clarifies it only lists breakpoints created via breakpoint_set, which is useful, but it does not disclose behavior like whether it triggers a session refresh, requires an active session, or what happens if the session is invalid.

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

Conciseness5/5

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

A single, well-structured sentence that front-loads the verb and resource, then clarifies scope in a parenthetical. Every word earns its place.

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

Completeness3/5

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

For a simple list operation with one parameter, the description is mostly complete. However, it lacks context about edge cases (e.g., no breakpoints set, session not found) and does not mention if the list is ordered or includes disabled breakpoints. Given the low complexity, it is adequate but has room to clarify the return contract.

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?

With 0% schema coverage, the description was expected to clarify the sessionId parameter, but it does not. However, the schema is simple and self-explanatory, with a single required 'sessionId' string. The description adds no extra meaning, but the parameter is obvious for the target audience, so a middle score is fair.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Lists') with a clear resource ('breakpoints currently tracked on a session'). It also distinguishes itself from sibling breakpoint_clear and notes the scope ('those set via breakpoint_set'), which differentiates it from a generic breakpoint list.

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 implies usage in the context of a debug session and contrasts with breakpoint_clear, but it does not explicitly state when to use this versus an alternative like a hardware breakpoint list or when it would return empty. It is minimally adequate.

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

breakpoint_setSet a breakpointB

Sets a breakpoint by file:line (e.g. main.c:42), symbol name (e.g. main), or address (e.g. *0x08000200).

ParametersJSON Schema
NameRequiredDescriptionDefault
locationYes
conditionNoConditional expression, e.g. 'count == 5'
sessionIdYes
temporaryNoDeleted automatically after the first hit (default: false)

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states that a breakpoint is set and how to specify the location. It does not mention whether an active debug session is required, whether the breakpoint takes effect immediately, whether a breakpoint ID is returned, or any 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.

Conciseness5/5

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

One compact sentence with inline examples carries the essential information without fluff. The location formats are front-loaded, making the primary behavior immediately clear.

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

Completeness2/5

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

With no output schema and no annotations, the description needs to cover behavioral context more thoroughly. It explains how to specify a location but omits expected return values, interaction with session state, and the meaning of optional parameters beyond the schema's brief descriptions. This leaves gaps for a 4-parameter tool.

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 significant value for the 'location' parameter by listing accepted formats (file:line, symbol, address), which the schema leaves undefined. Other parameters (condition, temporary) have schema descriptions, but 'sessionId' is undocumented in both the schema and description, so coverage remains incomplete.

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 action ('Sets a breakpoint') and explicitly enumerates the supported location formats with concrete examples (file:line, symbol, address). This distinguishes it from sibling tools like breakpoint_list and breakpoint_clear, which manage existing breakpoints.

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

Usage Guidelines2/5

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

The description gives no guidance on when to choose this tool over alternatives, nor does it mention prerequisites, session requirements, or follow-up actions. The only usage hints are the location syntax examples, which are parameter-level rather than tool-selection-level.

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

debug_connectConnect a debug sessionA

Starts a debug session: spawns ST-LINK_gdbserver and arm-none-eabi-gdb (MI2), loads ELF symbols, and connects via target extended-remote.

ParametersJSON Schema
NameRequiredDescriptionDefault
apIdNoAccess port ID, for multi-core devices (default: 0)
deviceNoMCU device, e.g. STM32G431CBTx (default: STM32G431CBTx)
serialNoST-LINK serial number; omit to auto-select if exactly one probe is attached
elfPathYesPath to the .elf file with debug symbols to load
interfaceNodefault: swd
frequencyKhzNoSWD/JTAG frequency in kHz (default: 4000)
haltOnConnectNoKeep the core halted after connecting (default: true)

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by revealing that it spawns external processes (ST-LINK_gdbserver and gdb), loads ELF symbols, and uses MI2/target extended-remote. However, it does not disclose side effects like whether an existing session must be absent, whether it blocks, or how cleanup works.

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

Conciseness5/5

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

The description is a single, information-dense sentence that front-loads the primary purpose and then gives concrete technical steps. Every clause adds value and there is no redundant wording.

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

Completeness3/5

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

The tool is moderately complex with 7 parameters and no output schema, and the description covers the main launch actions but omits return behavior, failure conditions, and session-lifecycle expectations. It is sufficient as a starting point, but the agent would benefit from knowing what indicates success and whether an existing session must be disconnected first.

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?

Schema description coverage is 100%, so the parameters are already fully documented. The description adds only indirect meaning by mentioning that ELF symbols are loaded, which relates to elfPath, but it does not add semantic detail beyond what the schema already provides for apId, serial, interface, or other parameters.

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 uses a specific verb ('Starts a debug session') and identifies the exact resource and actions: spawning ST-LINK_gdbserver and arm-none-eabi-gdb, loading ELF symbols, and connecting via target extended-remote. This clearly distinguishes it from siblings like debug_disconnect, debug_run, and debug_session_status.

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 implies when to use the tool ('Starts a debug session') but does not explicitly state when not to use it or name alternatives. It does not mention prerequisites such as probe detection or that this is the entry point before other session tools, so usage context is only implied.

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

debug_disconnectDisconnect a debug sessionA

Cleanly tears down a debug session's gdb and ST-LINK_gdbserver child processes.

ParametersJSON Schema
NameRequiredDescriptionDefault
sessionIdYes

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses that the operation cleans up child processes (gdb and gdbserver), which adds context, but it doesn't mention side effects, error conditions, or whether it's idempotent. This is adequate but not exceptional.

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

Conciseness5/5

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

The description is a single, concise sentence that gets straight to the point. No wasted words, and it effectively communicates the tool's action and target.

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?

Given the tool's simplicity (one parameter, no nested objects, no output schema) and the available sibling context, the description covers the essential purpose. It could mention return behavior or prerequisites, but for a disconnect operation, it is sufficiently complete.

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?

With 0% schema coverage, the description must compensate. The phrase 'a debug session's' clarifies that sessionId refers to a debug session identifier, providing meaning beyond the generic 'sessionId' field. However, it only implicitly connects the parameter to the operation.

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 uses the specific verb 'tears down' and clearly identifies the resource: 'a debug session's gdb and ST-LINK_gdbserver child processes.' This distinguishes it from siblings like debug_connect and debug_session_status, making its function unambiguous.

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 word 'Cleanly' implies this is the proper teardown method, but the description does not explicitly contrast it with alternatives or state when not to use it. Usage is implied rather than explicit, so it earns a mid-range score.

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

debug_haltHalt executionB

Interrupts the running target.

ParametersJSON Schema
NameRequiredDescriptionDefault
sessionIdYes

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral transparency. It states only the core action ('Interrupts the running target') and does not disclose post-halt state, resumability, side effects, or error conditions.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no filler or redundant information. It earns its place by clearly stating the tool's action and target.

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

Completeness3/5

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

For a simple one-parameter action, the description is minimally adequate, but it omits important context such as session requirements and behavior after halting. Given the absence of annotations and output schema, a bit more context would improve completeness.

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

Parameters2/5

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

The schema has 0% description coverage for the only parameter, sessionId. The description does not explain what the sessionId refers to, how to obtain it, or its format, leaving the agent to infer its meaning from context.

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 uses a specific verb ('Interrupts') and a clear resource ('the running target'), making the tool's purpose immediately understandable. It also distinguishes this tool from siblings like debug_run, debug_step, and debug_reset.

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?

Usage is implied: interrupt a running target. However, there is no explicit guidance about when to use this versus alternatives such as debug_step or debug_reset, nor any mention of prerequisites like an active debug session.

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

debug_resetReset the targetA

Resets the target via ST-LINK_gdbserver's monitor reset command, optionally resuming afterward.

ParametersJSON Schema
NameRequiredDescriptionDefault
haltNoStay halted after reset (default: true — set false to resume immediately)
sessionIdYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the underlying mechanism (`monitor reset`) and the optional resume behavior, but it does not explain what happens to the current debug session, whether the target must be connected, or what the command returns. This is more than minimal but not comprehensive.

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

Conciseness5/5

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

The entire description is one sentence that directly states the action and the key option. No filler or redundancy.

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

Completeness3/5

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

The tool is simple, but the description omits any mention of return values or failure modes. It also does not explicitly state that a session must exist, though this is implied by the required `sessionId` parameter. Given no output schema, more detail would be helpful, but the core action is described.

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

Parameters2/5

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

The schema provides descriptions for only one of two parameters (halt), and the description adds no new detail about `sessionId`. The phrase 'optionally resuming afterward' restates the halt parameter’s meaning already present in the schema. With 50% schema coverage, the description should compensate but does not explain the required `sessionId`.

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 uses the specific verb 'Resets' followed by the resource 'the target' and names the underlying command (ST-LINK_gdbserver's 'monitor reset'). This clearly distinguishes it from sibling tools such as debug_run, debug_halt, and debug_step.

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 does not explicitly state when to use this tool versus alternatives. It implies the purpose but lacks explicit guidance on prerequisites (e.g., active session) or situations where a different tool (e.g., debug_halt) would be more appropriate.

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

debug_runResume executionA

Resumes (continues) the target and waits for it to stop again (e.g. a breakpoint), up to a timeout.

ParametersJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
waitForStopMsNoHow long to wait for a stop before returning 'running' (default: 5000)

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It does state that the tool waits for a stop up to a timeout, which is valuable. However, it does not mention prerequisites (e.g., must be halted), what happens if already running, or exact return values. This partial transparency warrants a 3.

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

Conciseness5/5

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

The description is a single, front-loaded sentence that states the core action first ('Resumes (continues) the target'), then adds timeout behavior. It avoids redundancy and is appropriately concise, with no wasted words.

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

Completeness2/5

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

Given the tool has two parameters, no output schema, and no annotations, the description is incomplete. It does not explain return values (though one is hinted via waitForStopMs), error conditions, or prerequisites like the target being in a halted state. This is a simple-looking tool but still lacks enough context for an agent to understand side effects or failure modes, so it scores a 2.

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

Parameters2/5

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

The schema provides descriptions for only waitForStopMs (50% coverage), leaving sessionId meaningless. The main description does not mention either parameter or clarify sessionId's purpose. Since coverage is exactly 50% and the description fails to compensate for the undocumented required parameter, this scores a 2.

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 function: 'Resumes (continues) the target and waits for it to stop again (e.g. a breakpoint)'. It uses a specific verb and resource, and distinguishes itself from sibling tools like debug_step (single-step) and debug_reset by focusing on continuing execution until a stop, making its purpose unambiguous.

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 does not explicitly state when to use this tool vs alternatives, such as debug_halt or debug_step. While it's implied that this is for resuming after a halt, there is no direct guidance on when to prefer it over other sibling tools. The context is clear but not explicit, so it scores a 3.

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

debug_session_statusDebug session statusA

Reports the status of one debug session (by id), or lists all active sessions if id is omitted.

ParametersJSON Schema
NameRequiredDescriptionDefault
sessionIdNo

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the burden for transparency. It uses verbs like 'reports' and 'lists', which imply a read-only operation, but it does not disclose potential side effects (none expected), permissions, errors, or rate limits. It is minimally transparent but not fully explicit.

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

Conciseness5/5

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

The description is a single, clear sentence with no redundancy. It efficiently conveys the core functionality and the parameter's role.

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?

For a simple status-check tool, the description is complete. It specifies the two modes of operation (specific vs. all) and does not need to elaborate on return values since no output schema is provided. The complexity is low, and the description covers all necessary aspects.

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 description fully explains the only parameter, sessionId, including its optionality (omitting it lists all sessions). This goes beyond the schema, which only lists the field name and type.

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 function: reporting status of a specific debug session by ID or listing all active sessions when ID is omitted. It distinguishes from sibling tools like debug_connect or memory_read by focusing on status retrieval.

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 implies usage for checking session status but does not explicitly mention when to use this tool versus alternatives. It lacks guidance on scenarios where this tool is preferred or when not to use it, especially given the many sibling debug tools.

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

debug_stepSingle-stepB

Steps the target: 'over' (next line, step over calls), 'into' (step into calls), or 'out' (finish the current function).

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNodefault: over
sessionIdYes
waitForStopMsNo

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Steps the target' implies a mutation of execution state, but it does not mention side effects such as halting or resuming execution, the need for an active session, or the impact of waitForStopMs. The tool acts on a target but no consequences or prerequisites are disclosed.

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

Conciseness5/5

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

The description is a single, well-structured sentence that front-loads the core action and immediately explains the options. Every word adds value, with no filler or redundancy.

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

Completeness2/5

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

For a debug tool with three parameters, no output schema, and no annotations, this description is incomplete. It fails to mention the requirement for a valid sessionId, the purpose of waitForStopMs, or any behavioral expectations (e.g., whether the tool returns after the step completes). Users are left guessing about essential operational details.

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

Parameters2/5

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

The description explains the 'mode' parameter well, including the meaning of each enum value and its default. However, schema description coverage is only 33%, and the required 'sessionId' and optional 'waitForStopMs' are left entirely undocumented. The description does not compensate for this low coverage, leaving critical parameters unexplained.

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 verb 'Steps' and the target, and enumerates the three modes ('over', 'into', 'out') with brief explanations. This distinguishes it from sibling tools like debug_run (complete execution) and debug_halt (stop execution), making its specific function unambiguous.

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 implies usage for stepping through code by listing modes, but it does not explicitly state when to use this tool versus alternatives (e.g., debug_run for full execution, or when a breakpoint should be set first). No exclusions or prerequisites are provided, leaving the 'when to use' somewhat implicit.

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

evaluate_expressionEvaluate an expressionB

Symbol-aware expression evaluation in the current frame via gdb's -data-evaluate-expression — reads globals/locals by name, struct/array member access, pointer dereference, arithmetic, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
expressionYese.g. 'my_global', 'some_struct.field', '*(int*)0x20000000', 'my_array[3]'

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral transparency. It mentions that evaluation happens via gdb's -data-evaluate-expression, which hints at potential side effects, but does not disclose whether this operation is read-only or may alter state. It also does not mention error conditions, permission requirements, or whether the evaluation could change program state. For an expression evaluation tool, this is a notable gap.

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 concise, single-sentence, and includes the tool's mutation of using gdb's command. It is efficient in conveying the core purpose. It loses a point because it could be more front-loaded with usage guidance, but the length is appropriate for an evaluation tool.

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

Completeness3/5

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

The tool has only 2 parameters, both required, with partial schema description. The description is complete enough for a simple evaluator, but since there is no output schema and no annotations, it should describe more about return values and potential side effects. Contextual signals show a medium complexity tool (expression evaluation), and the description covers its main parameters but lacks behavioral depth.

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?

Schema description coverage is 50%, meaning the 'expression' parameter has a description with examples, and the 'sessionId' parameter is only noted as a string with no additional details. The description provides examples for the expression parameter, adding some value beyond the schema. However, it does not explain the sessionId parameter's semantics; but since sessionId is a common pattern, the baseline of 3 is appropriate when schema partially covers parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool evaluates an expression in the current frame using gdb's -data-evaluate-expression, listing examples of supported expressions. It distinguishes itself from sibling tools like memory_read and register_read by focusing on symbol-aware expression evaluation. A score of 5 is not given because the exact scope of 'symbol-aware' could be clearer, but it is unambiguous enough for an agent.

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 implies usage when you need to evaluate expressions, but does not explicitly state when to use this tool versus alternatives like memory_read or register_read. Sibling tools are present, but the description does not provide direct comparison or exclusion criteria. However, the expression context (e.g., dereferencing pointers) suggests a clear use case that goes beyond memory_read or register_read.

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

flash_load_in_sessionReflash firmware within a debug sessionA

Reflashes the currently loaded ELF via gdb's load (MI: -target-download) inside an already-open debug session. No USB conflict — ST-LINK_gdbserver retains ownership of the probe throughout.

ParametersJSON Schema
NameRequiredDescriptionDefault
runToMainNoSet a temporary breakpoint at main and run to it after loading (default: false)
sessionIdYes
resetAfterNoIssue a target reset after loading (default: true)

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that it operates within an already-open session holiding the probe, avoiding USB conflict, which is significant behavioral info beyond the tool name. It also implies state (session must be open) and mentions setting a temporary breakpoint and reset behavior via parameters. Minor gap: doesn't state whether it halts the target or affects current execution state beyond the parameters.

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

Conciseness5/5

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

Two tightly packed sentences. Front-loaded with the core action, technical method, and immediate operational context. Every word adds value; no filler.

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?

Given no annotations, no output schema, and 3 parameters, the description covers essential purpose and key behavioral note (no USB conflict). It could be more complete by specifying prerequisites (must be in a debug session) and side effects (target reset default), but the description is largely sufficient for a fairly simple flashing tool.

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?

Schema coverage is 67% (sessionId lacks description, but runToMain and resetAfter have descriptions). The description itself adds no parameter-specific detail beyond what schema provides, but it does clarify the overall action's effect on parameters indirectly (e.g., 'run to it after loading' aligns with runToMain). With moderate coverage, baseline 3 is appropriate; it doesn't compensate for sessionId's lack of description.

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 it reflashes the currently loaded ELF via gdb's `load` inside an already-open debug session. It specifies the verb (reflash), resource (ELF), and method (gdb load), and distinguishes from siblings like flash_standalone by emphasizing the in-session context.

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?

It implicitly conveys when to use: inside an existing debug session, as opposed to standalone flashing. It mentions 'No USB conflict — ST-LINK_gdbserver retains ownership' which implies a key benefit/alternative path, but lacks explicit exclusions or comparisons like 'use flash_standalone when no session is open'.

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

flash_standaloneFlash firmware (standalone)A

One-shot flash via STM32_Programmer_CLI — no debug session required. Fails with DEVICE_BUSY if a debug session is already open on the same probe (it holds exclusive USB access); disconnect first, or use flash_load_in_session instead.

ParametersJSON Schema
NameRequiredDescriptionDefault
runNoStart execution after programming (default: true)
fileYesPath to the .elf/.bin/.hex file to program
resetNodefault: hard
serialNo
verifyNoVerify after download (default: true)
addressNoFlash address for raw .bin files, e.g. 0x08000000 (ignored for .elf/.hex)
frequencyKhzNo

TDQS

A4.3/5.0
Behavior4/5

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

Adds meaningful behavioral context: open failure mode ('FAILED with DEVICE_BUSY'), holds exclusive USB access, and notes if the same probe is being used by another session. However, it also has no annotations and does not disclose success side effects or the outcome when there are no failures, since there is no output schema.

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?

Description is a succinct single block with semicolons that combine workflow necessary, failure details and alternative; no filler. It doesn't explode into an endless list and first sentences are enough to convey action and purpose.

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?

For a tool with a direct hardware interface and no output schema, description mentions expected failure conditions (must disconnect/debugger), alternative path, and prerequisite. It never specifies the underlying programming sequence or target device in a separate section, but it avoids requiring output definitions.

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?

Input schema covers 5/7 parameters: file, run, reset, boot address and verify. It adds default values and a COM semantics meaning but leaves 'serial' and 'frequencyKhz' undocumented despite their presence in the schema. Minimal additional meaning added to the schema's own descriptions.

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?

Description states a specific goal ('one-shot flash'), names a specific interface (STM32_Programmer_CLI), and distinguishes itself from a sibling (flash_load_in_session) and a sibling with the alternative name that also references a specific failure mode/busy device state.

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?

Explicitly states when to use ('no debug session required'), when not to use ('if a debug session is already open on the same probe'), and names an explicit alternative ('disconnect it first, or use flash_load_in_session instead').

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

list_probesList ST-LINK probesA

Lists connected ST-LINK probes via STM32_Programmer_CLI. Returns an empty list (not an error) if none are attached.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior4/5

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

The description explicitly discloses that an empty list is returned instead of an error when no probes are attached, which is valuable behavior beyond what annotations (none) would provide. No other behavioral details are given, but this is sufficient for a simple list operation.

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

Conciseness5/5

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

Two sentences, front-loaded with the action, and a useful edge-case clarification. No wasted words.

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 has no parameters, no output schema, and a single simple behavior, the description is complete. It covers the purpose and a key behavioral nuance (empty list vs error).

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

Parameters4/5

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

The tool has zero parameters clauses, and per guidelines a baseline of 4 is appropriate. The description adds no parameter details because none exist.

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 it lists connected ST-LINK probes via a specific CLI tool, with a distinct verb+resource. It differentiates from all siblings which focus on debugging and memory operations.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives, nor any exclusions or prerequisites. Usage context is only implied by the tool's purpose.

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

memory_readRead memoryA

Reads raw bytes from target memory at an address or symbol-address expression (e.g. '&my_global').

ParametersJSON Schema
NameRequiredDescriptionDefault
lengthYes
addressYesHex address (0x...) or a gdb expression evaluating to an address, e.g. '&my_global'
sessionIdYes

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description must fully convey behavioral traits. It states it 'reads raw bytes', implying a non-mutating operation, but it does not disclose prerequisites like requiring an active session, potential side effects (e.g., whether it halts the target), or error conditions. The description offers minimal behavioral context beyond the basic action, which is insufficient given the lack of annotation support.

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

Conciseness5/5

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

The description is a single, concise sentence that is front-loaded with the primary purpose and includes an illustrative example. There is no verbose or redundant content; every word contributes to understanding the tool's function.

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

Completeness3/5

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

Given the tool is relatively simple (3 parameters, no output schema), the description provides a clear overview but lacks details on return value format, error handling, or specific conditions of use. It does not explicitly state what the tool returns (e.g., hex-encoded bytes), and it omits any mention of session requirements or limitations, making it only partially complete for a tool with no structured output information.

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 schema description coverage is only 33%, with only the address parameter described in the schema. The description adds meaning for the address field by explaining it can be a symbol-address expression and providing an example, which is helpful. However, it does not add any additional meaning for the length or sessionId parameters, leaving them underspecified relative to the low coverage.

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 reads raw bytes from target memory, specifying both the resource (target memory) and the action (read). It also provides an example of the address expression format ('&my_global'), which distinguishes it from sibling tools like memory_write and evaluate_expression.

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 implies the tool is for reading memory contents, but it does not explicitly state when to use it versus alternatives, nor does it mention any exclusions or preconditions. The usage context is understandable from the purpose, but without explicit guidance or mention of when not to use it (e.g., for expression evaluation), it lacks clear when-to-use instructions.

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

memory_writeWrite memoryA

Writes raw bytes to target RAM/registers at an address. Blocked for addresses inside the flash window (use flash_standalone / flash_load_in_session for flash) unless STMCP_ALLOW_FLASH_ADDRESS_WRITE is set.

ParametersJSON Schema
NameRequiredDescriptionDefault
addressYesHex address (0x...) or a gdb expression evaluating to an address
bytesHexYesBytes to write, as a hex string, e.g. 'deadbeef'
sessionIdYes

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It reveals the blocking behavior for flash addresses and the environment variable override, adding meaningful context beyond a simple 'write' action. It does not detail return values or side effects, but for a write tool, the disclosed constraints are significant.

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

Conciseness5/5

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

Two sentences, front-loaded with the primary purpose, then the key constraint and alternatives. Every word earns its place, and the structure is clear and efficient.

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?

For a 3-parameter tool with no annotations and no output schema, the description is quite complete: it explains what it does, where it operates, what is blocked, and provides fallback tools. It does not explain return values, but that's acceptable without an output schema. The only minor gap is the lack of any note about write permissions or side effects, but the flash constraint and exception are the most critical context.

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?

Schema description coverage is 67%, so the schema already covers address and bytesHex with examples and type hints. The description adds context about 'raw bytes' and 'target RAM/registers' but does not clarify sessionId or add much beyond the schema. With medium coverage, the description neither fully compensates nor is redundant.

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 writes raw bytes to target RAM/registers at an address, using the specific verb 'writes' and identifying both the resource and action. It distinguishes itself from sibling tools like flash_standalone and register_write by explicitly mentioning RAM/registers and the flash exclusion.

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?

Provides explicit guidance on when to use this tool (RAM/registers) and when not to (flash window), and names alternatives (flash_standalone / flash_load_in_session). It also discloses the exception via STMCP_ALLOW_FLASH_ADDRESS_WRITE, giving clear decision criteria.

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

read_fault_registersRead Cortex-M fault registersA

One-call dump of Cortex-M SCB fault registers (CFSR/HFSR/MMFAR/BFAR/SHCSR/CPUID/ICSR) plus PC/SP/LR, with CFSR/HFSR bits decoded to flag names. Raw evidence only — no root-cause interpretation.

ParametersJSON Schema
NameRequiredDescriptionDefault
sessionIdYes

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden and does a solid job: it discloses the output contents (CFSR/HFSR/etc., decoded bit flags, raw evidence) and explicitly states 'no root-cause interpretation,' setting expectations about scope. It does not address side effects or session requirements, but as a read/dump operation this is reasonably transparent.

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

Conciseness5/5

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

The description is a single front-loaded sentence that packs the register list, decoding behavior, and output philosophy without filler. Every phrase contributes information.

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?

Given only one parameter and no output schema, the description adequately covers the tool's purpose and return scope by enumerating registers and noting decoded flags. It falls short only on explicitly connecting the tool to a debug session and on usage guidance, which are handled in other dimensions.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not mention sessionId at all. Although sessionId is a single self-descriptive parameter, the description fails to clarify that it refers to the target debug session, which is important given the sibling debug_connect/debug_session_status tools.

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 specifies the action ('one-call dump'), the resource ('Cortex-M SCB fault registers'), and the exact register set plus PC/SP/LR. It differentiates from sibling register_read by presenting a combined, pre-decoded fault-register dump rather than a generic single-register read.

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?

Usage is implied: this tool is for obtaining a complete fault-register snapshot in one call. However, it does not explicitly state when to prefer this over register_read, nor does it mention prerequisites like needing an active halt or debug session.

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

register_readRead core registersA

Reads named core registers (default: all general-purpose + sp/lr/pc/xpsr) via gdb MI.

ParametersJSON Schema
NameRequiredDescriptionDefault
registersNoRegister names, e.g. ['pc','sp','r0']. Default: all core registers.
sessionIdYes

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must convey behavior. It states 'reads', indicating a read-only operation, but provides no details on error conditions, side effects, or prerequisites like an active debug session. The mention of 'via gdb MI' adds implementation context but not behavioral transparency.

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

Conciseness5/5

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

The description is a single, concise sentence that includes the essential purpose, the optional parameter behavior, and the implementation method. No redundant or unnecessary information.

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?

The description is adequate for a simple read operation, giving the default register set and the mechanism. While it doesn't explain the return format or the necessity of sessionId, that is partially covered by the schema and the overall simplicity of the tool. It could benefit from a note on active session requirements, but is largely complete.

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 value for the 'registers' parameter by explaining the default, and the schema also provides a description for it. However, the 'sessionId' parameter is required but not explained in either the description or the schema, leaving a gap in parameter semantics.

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?

Clearly states it reads core registers, specifying the verb 'reads' and the resource 'core registers'. It also distinguishes from sibling tools like read_fault_registers by specifying 'core' and the default register set.

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?

Implicitly suggests usage for reading general-purpose registers, but does not explicitly compare with alternatives like read_fault_registers or evaluate_expression. No direct when-to-use guidance beyond the default set.

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

register_writeWrite a core registerB

Writes a value to a named core register via gdb's -gdb-set $<register>=<value>.

ParametersJSON Schema
NameRequiredDescriptionDefault
valueYesValue expression, e.g. '0x08000200' or '42'
registerYesRegister name, e.g. 'r0', 'pc', 'sp'
sessionIdYes

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the write action and the underlying gdb command, but does not disclose side effects, session requirements, error behavior, or whether the operation is reversible. For a mutation tool, this is minimal disclosure.

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

Conciseness5/5

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

The description is a single, front-loaded sentence that immediately states the action and mechanism. No unnecessary words, perfectly concise.

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

Completeness2/5

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

For a tool with no output schema and no annotations, the description is too sparse. It fails to mention when to use it, any required preconditions (like an established debug session), or what happens after the write (e.g., confirmation, potential failure modes). The agent gets only the basic write intent.

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

Parameters2/5

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

The schema covers two of three parameters with descriptions (value and register), but sessionId is undocumented. The description adds no extra parameter meaning beyond referencing the gdb command, and does not clarify what sessionId refers to or how it relates to the session context.

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 title and description clearly state the tool writes a value to a core register via gdb's `-gdb-set` command. It uses a specific verb (writes) and resource (core register), and distinguishes from siblings like register_read and memory_write by specifying the register access path.

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 implies usage for writing registers but does not mention when to use versus alternatives like register_read or memory_write, nor does it state exclusions or prerequisites (e.g., needing an active debug session). It provides no explicit guidance on context.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 19 tool updatesv0.1.0
    • First observedbreakpoint_clear
    • First observedbreakpoint_list
    • First observedbreakpoint_set
    • First observeddebug_connect
    • First observeddebug_disconnect
    • First observeddebug_halt
    • First observeddebug_reset
    • First observeddebug_run
    • First observeddebug_session_status
    • First observeddebug_step
    • First observedevaluate_expression
    • First observedflash_load_in_session
    • First observedflash_standalone
    • First observedlist_probes
    • First observedmemory_read
    • First observedmemory_write
    • First observedread_fault_registers
    • First observedregister_read
    • First observedregister_write

TDQS

A3.7/5.0

Scored across 19 tools

Disambiguation5/5

Each tool targets a distinct action: session lifecycle, run control, breakpoints, register/memory access, and flashing are clearly separated. The only similar pair, flash_standalone and flash_load_in_session, is explicitly differentiated by requiring or not requiring an active debug session.

Naming Consistency4/5

All tool names are lowercase snake_case and mostly follow a predictable domain-prefixed verb pattern such as breakpoint_set, memory_read, and debug_run. Minor exceptions like debug_session_status and flash_standalone break the strict verb_noun pattern but remain easy to anticipate.

Tool Count4/5

19 tools is on the heavier side, but the embedded debug workflow legitimately spans session management, execution control, breakpoints, register/memory inspection, fault diagnosis, and flashing. Each tool has a justifiable role, so the count feels slightly over ideal rather than bloated.

Completeness4/5

The toolset covers the full core debug loop: connect/disconnect, run/halt/reset/step, breakpoint management, register and memory access, expression evaluation, fault register dumps, and both standalone and in-session flashing. Missing conveniences like stack backtraces or watchpoints are minor gaps, not workflow-breaking omissions.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Stateful MCP server for driving debug probes (J-Link) to flash, debug, and inspect embedded targets. Enables AI agents to perform flash, memory, breakpoint, and ELF/SVD-aware operations conversationally.
    41
    30 PyPI
    10
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for embedded debugging based on probe-rs, providing 22 tools for ARM Cortex-M and RISC-V microcontrollers, including connection, memory operations, breakpoints, flash programming, and RTT communication.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides comprehensive debugging capabilities for J-Link debuggers, enabling memory, flash, register, and RTT operations through AI assistants.
    35
    MIT