MCP server for SEGGER J-Link debug probes — LLM-driven embedded debugging with RTT, GDB server, and Trice/Pigweed support
J-Link MCP demonstrates solid definition quality with clear, domain-specific naming (list_devices, read_memory, flash, backtrace, diagnose_crash) and excellent descriptions that explain WHAT the tool does, WHEN to use it, and critical prerequisites. All 30 tools have non-empty descriptions (avg ~140 chars, within ideal 10-1024 range). Input parameters are well-described with format hints (e.g., 'Hex address with 0x prefix, or decimal'). However, output schemas are NOT documented, the source code shows tool registration but does NOT declare what fields the tools return or their structure. This forces LLMs to infer response shapes and plan downstream calls blindly. Additionally, error handling and recovery guidance are absent from descriptions; tools do not explain what failures look like or how to recover. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk categories (DESTRUCTIVE operations like erase_sector, WRITE operations like flash). Composition is strong: tools are single-purpose, naming is verb_noun (read_memory, write_register, rtt_read), and related tools form clear chains (set_device → halt → read_register → resume). Parameter descriptions include helpful context ('Requires CMSIS-SVD file to be loaded', 'Requires a probe to be connected'), which reduces agent errors.
Print a backtrace from the current CPU state. Shows the call stack with function names, file names, and line numbers (if an ELF is loaded).
Check that everything needed to debug is in place: the probe software, a connected probe, a target device name, and the optional files that make output readable. Run this first when anything fails, or when starting on a machine for the first time.
Decode a register's fields using the SVD file. Requires the SVD to be loaded and the register to be defined in it. Returns symbolic field names, bit ranges, and interpreted values.
Diagnose a Cortex-M hardware fault. Decodes CFSR, BFAR, MMFAR, and other fault registers, unwinds the exception frame to show the faulting instruction address and register state at the time of the fault, names the instruction if an ELF is loaded, and (if RTT is available) correlates the device's own log.
Erase a sector (or range of sectors) of flash memory. Requires the flash bank and sector/address. Returns the erased address range.
Flash a binary or hex file to the target. Automatically detects hex (.hex) or binary (.bin) format. For hex files the address is always 0x0; for binary files the address defaults to 0x0 but can be overridden.
Output schemas completely undocumented. No tool in the registry declares what fields it returns, data types, or structure. LLMs cannot predict response shapes and must infer or guess. This breaks tool chaining and forces agents to waste tokens on discovery calls.
Missing tool annotations despite explicit risk categories. Tools are marked READ_ONLY, WRITE, or DESTRUCTIVE in metadata but do not use MCP readOnlyHint, destructiveHint, or idempotentHint annotations. LLMs cannot automatically distinguish safe tools (read_memory, backtrace) from unsafe ones (flash, erase_sector, write_memory), preventing safety guardrails.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 65 | 2026-07-28+ | v2 |
Load an ELF file for symbol information and debugging. Configures the GDB session with symbol tables so backtrace and other debug commands can name functions and variables.
Get the current CPU state: running or halted, PC, SP, link register, fault status (if halted), and other info. Returns all registers and CPU mode.
Halt the target CPU, stopping execution immediately. Returns the CPU state and reason for the halt.
Scan for connected PROBES — the debuggers plugged into this machine, not target chips. Despite the name it does not list target devices; use search_devices for those. Shows probe serial numbers and whether one is reachable.
List all peripherals in the SVD file, optionally filtered by a substring. Returns peripheral names, addresses, and descriptions.
Read a block of memory. Returns memory contents as a hex dump with ASCII decoding.
Read all registers of a peripheral, with symbolic names and decoded fields. Requires a CMSIS-SVD file to be loaded. Returns register names, addresses, and decoded field values.
Read a single ARM Cortex-M register. Returns the register name, number, and value.
Reset the target CPU. Halts and resets the core (not a power-on reset). Returns the CPU state after reset.
Resume the target CPU, allowing it to run. Returns new CPU state.
Clear the RTT log buffer on the server side. Does not affect the target; next rtt_read will start with new messages from the target.
Read the most recent RTT log lines. Returns RTT messages with device timestamps, log levels, and module names if the firmware has written them in that format.
Search the RTT log by log level or text. Returns matching lines, the most recent first.
Check RTT status: whether it is connected, how many channels are active, and memory use. Returns the RTT control block ID (should read 'SEGGER RTT' if RTT has been initialized by the firmware), and stats per channel.
Search the device names this J-Link supports, narrowed by a substring. Device names are exact (case-sensitive), and a wrong one fails just like broken hardware; use this tool to find the exact name for your board.
Configure the target device name. Device names are exact and case-sensitive; find the correct name with search_devices. The server remains connected to the probe, so this is safe to call at any time — set_device, debug, try something, set_device to a different board, debug that one instead, all in one session.
Tell the server where the firmware's RTT control block is (its _SEGGER_RTT symbol), at runtime. Without it RTT cannot be recovered after a reset or flash, and a stopped stream is indistinguishable from a quiet device. Mirrors set_device.
Point the server at a CMSIS-SVD file for the target at runtime, so peripheral reads come back with named fields and decoded values instead of raw hex. Mirrors set_device — you do not have to restart with SVD_PATH set.
Start a complete debug session: start the GDB server, enable RTT, and capture the boot log. Returns GDB and RTT status, and the boot log collected during startup.
Single-step the CPU (execute one instruction), optionally stepping over function calls. Returns CPU state and instruction executed.
Stop the debug session: stop the GDB server and disconnect RTT. Returns status of the shutdown.
Read Serial Wire Output (SWO) debug trace data. Decodes the ITM stream and returns trace packets.
Write a value to a single memory address. Returns the written value and the address.
Write a value to an ARM Cortex-M register. Returns the register name and written value.
No error recovery guidance in descriptions. Tools do not explain what failures look like (e.g., 'Probe not found', 'Device not supported', 'SVD file missing'), how to recover, or what the agent should try next. Pattern: recovery-guide requires actionable error messages.
Missing pagination and result limits documentation. Tools like list_devices, list_peripherals, rtt_read, rtt_search lack explicit limits or pagination parameters. LLMs do not know if results are capped or could unboundedly grow, risking context window exhaustion.
Parameter descriptions lack validation constraints. e.g., set_rtt_address accepts 'Hex address' but does not specify format pattern, range, or how to handle invalid input. Parameter descriptions should include format, range, and enum constraints per pattern:constrained-input.
Some parameters are ambiguously named without sufficient type hints. e.g., 'path' parameter in set_svd_path and gdb_load could be relative or absolute; 'address' in read_memory accepts 'hex with 0x prefix, or decimal' but no validation rule guards against malformed input. Consider stricter naming (svd_file_path, elf_file_path) and explicit format descriptions.