Skip to main content
Glama

debug_watchpoint

Set, clear, or list hardware data watchpoints on STM32 variables or addresses to catch reads, writes, or value matches during debugging.

Instructions

Manage data watchpoints (DWT comparators — usually only a few per MCU).

Args: session_id: Session ID from debug_session_start. action: "set", "clear", "clear_all", or "list" (default). location: Variable name (ELF) or hex address — required for set/clear. width: Access size in bytes: 1, 2, or 4 (default 4). access: "r", "w", or "rw" (either direction, default). value: If set (e.g. "5"), break only when the watched value matches.

Returns: Watchpoint list after the operation.

Input Schema

NameRequiredDescriptionDefault
valueNo
widthNo
accessNorw
actionNolist
locationNo
session_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations exist, so the description carries the full load. It does disclose the hardware-scarcity trait and the 'break only when value matches' conditional-stop semantics, which is genuinely useful. It says nothing about permissions, whether an existing watchpoint is overwritten, or whether the resulting halt requires debug_wait_halt to observe.

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?

Front-loaded purpose sentence followed by a compact Args block, with defaults stated inline. The Returns section is somewhat redundant given an output schema exists, but it is one line and adds little waste.

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?

All six parameters are covered and the return value is summarized (though an output schema already exists, so that line is optional). The remaining gap is integration context: how watchpoint hits surface to the agent and how this interacts with the halt/resume and wait_halt siblings.

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 coverage is 0%, and the description fully compensates: it documents every parameter including accepted string values for action and access, the allowed widths, the default for each, that location is required for set/clear, and that location accepts either an ELF symbol name or a hex address. This is exactly what the empty schema lacks.

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?

Opening line is a specific verb+resource: 'Manage data watchpoints (DWT comparators)'. It clarifies the mechanism and a key constraint (only a few per MCU). It does not distinguish the tool from the closely related debug_breakpoint sibling, so it stops short of a 5.

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 action list implies when to set vs clear vs list, and 'usually only a few per MCU' hints at scarcity. But there is no explicit guidance on choosing watchpoints over debug_breakpoint or debug_mem, and no stated prerequisites (e.g. whether the target must be halted).

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