Skip to main content
Glama
crosspad-mcp-server

crosspad-mcp-server

Official
by CrossPad

crosspad_trace

Destructive

Trace STM32G0B1 firmware variables in real time over ST-Link SWD without halting the CPU. Start a trace, add or remove signals, read recent samples, and export captures to CSV.

Instructions

[STM HW] Real-time SWD trace of STM32G0B1 firmware variables over ST-Link: non-halting RAM polling of variables resolved from the Debug ELF (like ST-Studio/CubeMonitor). Pick an action: doctor (environment precheck -> issues[]; run first, resolve them, then config_set), config_set (persist a path/serial to ~/.config/crosspad-mcp/config.json), symbols (list/search traceable variables, query optional), start (begin a background trace: signals[], rate_hz), stop, add/remove (change the live signal set of the active trace), status (device_state running/stop_suspected/exited, sample_count, actual_fs, signals), read (recent samples downsampled with per-signal stats; cheap), save (export the buffer to CSV, returns file_path), device_state (deep low-power/STOP register dump), ui (the localhost dashboard URL), plus write and call, which are danger tier and need confirmation. Signal names accept array indexing, e.g. 's_inputs[0]', 's_adc_raw[3]'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "crosspad_trace"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoconfig_set: one of stm_elf_path|pyocd_python|probe_serial|trace_dir|ui_open|stm_programmer_cli. stm_programmer_cli = path to STM32_Programmer_CLI for crosspad_flash target=stm. ui_open ∈ vscode(default: reply with the link → user clicks → opens in the VS Code Simple Browser; system-browser fallback after 30s if unopened)|browser(open system browser immediately)|none(never auto-open).
swoNostart (EXPERIMENTAL): map ITM stimulus ports to signal names, e.g. ['0:phase','1:isr_us']. Requires firmware that emits ITM on the SWO pin (NOT present in current CrossPad firmware — UNTESTED against real ITM). Omit for plain RAM polling. Fails soft: if SWV init fails, polling continues normally.
argsNocall: up to 4 integer args → r0-r3.
funcNocall: firmware function symbol to invoke (AAPCS).
queryNosymbols: case-insensitive substring filter.
valueNoconfig_set: the value to persist.
actionYesRequired params per action — doctor/stop/status/device_state/ui: (none); config_set: key,value; symbols: query?; start: signals[],rate_hz?; add/remove: signals[]; read: window_from?,window_to?,max_points?; save: format?; write: writes[]; call: func,args?,confirm,ret_type?,timeout?.
formatNosave: export format (csv).
writesNowrite: list of 'target=value' specs. target = @0xADDR[:type] (u8|u16|u32|i8|i16|i32|f32, default u32) or a DWARF symbol; value = hex 0x.. or decimal (float for f32). e.g. ['@0x50000414:u16=0xFFFF','s_vbat_mv=4200']. Allowlist: SRAM/peripheral/PPB only — Code/flash region is blocked.
confirmNocall: must be true — acknowledges the core is halted for the call.
rate_hzNostart: target sample rate (0 = as fast as the probe allows). Actual Fs is reported.
signalsNostart: variable names from `symbols` (e.g. ['s_vbat_mv','s_inputs[0]']). Also accepts raw @address specs that bypass DWARF — '@0x40021000' (u32), '@0x40021000:u16' (u8|u16|u32|i8|i16|i32|f32), '@0x20000000:u8[16]' (16-element block) — for peripheral registers / arbitrary RAM.
timeoutNocall: max seconds to wait for the function to return (default 2).
ret_typeNocall: decode r0 as this type (default u32; raw r0 always returned).
window_toNoread: end time (s) of the window.
max_pointsNoread: max points per signal (default 200).
window_fromNoread: start time (s) of the window.
confirm_tokenNowrite/call: token from a previous confirmation_required result. Re-issue the identical call with it to proceed. Each token is good for exactly one call.

Output Schema

NameRequiredDescriptionDefault
okNo
r0Nocall: the function's return register.
keyNo
docsNo
hintNo
nextNo
toolNo
errorNo
statsNo
actionNo
issuesNo
noticeNo
seriesNo
ui_urlNo
decodedNocall: r0 decoded as ret_type, when that is not u32.
outcomeNo
resultsNowrite: one entry per target=value written.
signalsNo
successYes
symbolsNo
actual_fsNo
file_pathNo
elicitationNo
stderr_tailNo
confirmationNo
device_stateNo
sample_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv11.0.0
  2. Removedv10.2.0
  3. First observedv9.2.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnly/destructive/openWorld, but the description adds real behavioral context: tracing is non-halting and runs in the background, the write allowlist blocks the Code/flash region (SRAM/peripheral/PPB only), call halts the core, confirm_token is single-use, and SWO mapping 'fails soft' so polling continues. These are exactly the side-effect and safety details an agent cannot infer from the annotations.

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?

Everything is packed into a single dense paragraph with a long semicolon-and-comma action list, which makes it hard to scan for one action's requirements. Much of the action/parameter mapping duplicates the schema, so several clauses do not earn their space even though the opening sentence is well front-loaded.

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 an 18-parameter, 14-action tool with annotations and an output schema, the description supplies the missing pieces: the setup workflow, the danger-tier confirmation flow, what read/save return at a high level, and the address/indexing syntax for signals. Nothing essential to invoking it correctly is left unstated.

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 per-parameter meaning is already fully documented in the input schema, and the description's 'Required params per action' clause largely restates the `action` enum's own schema description. It adds only light semantic glue (read is 'cheap', actual Fs is reported, signal names accept 's_inputs[0]' indexing), so the baseline 3 applies.

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 verb+resource+transport: real-time SWD trace of STM32G0B1 firmware variables over ST-Link via non-halting RAM polling, and tags itself '[STM HW]' to separate it from software-side siblings. It then enumerates all fourteen `action` values with a short gloss for each, so an agent knows exactly what the tool covers without opening the schema.

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?

It gives explicit sequencing guidance — 'doctor (environment precheck -> issues[]; run first, resolve them, then config_set)' — plus per-action intent such as read being 'cheap' and write/call being 'danger tier and need confirmation'. It does not name sibling tools as alternatives (e.g. when to prefer crosspad_flash or crosspad_console instead), which keeps it short of a 5.

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