Skip to main content
Glama
CrossPad

crosspad-mcp-server

by CrossPad

crosspad_trace

Trace STM32 firmware variables in real time via SWD polling: start, stop, add or remove signals, read samples, and export data to CSV for debugging and analysis.

Instructions

[STM HW] Real-time SWD tracer for the STM32G0B1 firmware (ST-Link). Non-halting RAM polling of firmware variables resolved from the Debug ELF (like ST-Studio/CubeMonitor). Pick an action: • doctor → environment precheck → issues[] (run this FIRST; resolve issues, then config_set). • config_set → persist a resolved path/serial to ~/.config/crosspad-mcp/config.json (key,value). • symbols → list/search traceable variables from the ELF (query optional). • start → begin a background trace (signals[], rate_hz). • stop → end the active trace. • add/remove → mutate the live poll set of the active trace (signals[]); returns the current signal set. • status → device_state (running/stop_suspected/exited), sample_count, actual_fs, signals. • read → recent samples downsampled + per-signal stats (cheap; safe for the LLM). • save → export the in-memory buffer to CSV (returns file_path). • device_state → deep low-power/STOP register dump. • ui → returns the localhost dashboard URL. Signal names accept array indexing, e.g. 's_inputs[0]', 's_adc_raw[3]'.

Input Schema

TableJSON 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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
keyNo
errorNo
statsNo
actionNo
issuesNo
seriesNo
ui_urlNo
signalsNo
successYes
symbolsNo
actual_fsNo
file_pathNo
stderr_tailNo
device_stateNo
sample_countNo
Behavior5/5

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

Annotations provide only readOnlyHint=false and destructiveHint=false, so the description carries full burden. It discloses key behaviors: non-halting RAM polling, background trace lifecycle, safe vs risky actions ('cheap; safe for the LLM' for read), soft-fail behavior for SWV init, blocked flash regions for writes, core halting for call, and config persistence location. This is exceptionally transparent.

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 (a dense bulleted list) but every line is functional. It's well-structured with action → behavior mapping and front-loads the most important instruction (run doctor FIRST). No fluff or filler. The length is justified given the 14 distinct actions and their differing param requirements, but a more compact reference table could have served equally well.

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?

Despite 17 params and an output schema, the description is remarkably complete: it maps actions to required params, explains lifecycle (config_set → start → add/remove → status → read → save), discloses experimental paths, documents fallback/soft-fail behaviors, and covers edge cases like raw address bypass and type decoding. For a hardware tracing tool with this complexity, the description is thorough and self-sufficient.

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 100%, so the baseline is 3. However, the description adds substantial value beyond the schema: the action field's description enumerates required params per action, and tools like signals and writes explain raw @address syntax, type decoding, and allowlist/blocklist regions. The call action disambiguates AAPCS, confirm requirement, and default ret types. The description meaningfully supplements the 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 gives a specific verb+resource: 'Real-time SWD tracer for the STM32G0B1 firmware (ST-Link)' with a clear enumeration of all 13 actions and what each does. It clearly distinguishes itself from siblings like crosspad_run (execution control) and crosspad_log (log access), being specifically about hardware trace/polling. The STM-specific scope makes it unmistakable.

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?

The description provides explicit sequencing guidance ('run this FIRST; resolve issues, then config_set'), and defines when each action applies. It notes deprecated/experimental features (swo UNTESTED, write/call requiring confirm). However, it doesn't explicitly state when to prefer this tool over siblings like crosspad_search_symbols or crosspad_stats, though the domain distinction (hardware trace vs. build/test) is implied.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CrossPad/crosspad-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server