Skip to main content
Glama
Klievan
by Klievan

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PROBE_TYPENoProbe backend: jlink, openocd, blackmagicjlink
JLINK_SPEEDNoConnection speed in kHz4000
BMP_GDB_PATHNoPath to GDB binaryarm-none-eabi-gdb
JLINK_DEVICENoTarget device (e.g., nRF52840_XXAA, STM32F407VG)Unspecified
JLINK_SERIALNoJ-Link serial number (multi-probe)
JLINK_GDB_PORTNoGDB server port2331
JLINK_RTT_PORTNoRTT telnet port19021
OPENOCD_BINARYNoPath to openocd binaryopenocd
OPENOCD_TARGETNoTarget config filetarget/stm32f4x.cfg
BMP_SERIAL_PORTNoBMP serial port/dev/ttyACM0
JLINK_INTERFACENoDebug interface: SWD or JTAGSWD
BMP_TARGET_INDEXNoTarget index after scan1
OPENOCD_GDB_PORTNoGDB server port3333
JLINK_INSTALL_DIRNoPath to SEGGER J-Link installation (auto-detect)
OPENOCD_INTERFACENoInterface config fileinterface/stlink.cfg
OPENOCD_TELNET_PORTNoTelnet command port4444

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_devicesA

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.

check_setupA

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.

set_svd_pathA

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.

set_rtt_addressA

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.

search_devicesA

Search the device names this J-Link installation accepts, by part number, manufacturer, or core. Use this before set_device instead of guessing a part number — the name must match exactly, and a wrong one fails in a way that looks like broken hardware.

set_deviceA

Set the target device name at runtime. Required before any debugging commands will work. The name must match J-Link's exactly — use search_devices to find it rather than guessing a part number. Examples: 'nRF52840_XXAA', 'nRF5340_xxAA_APP', 'STM32F407VG', 'STM32L476RG'.

start_debug_sessionA

One-call setup: starts GDB server via SEGGER J-Link, connects RTT (if supported), waits for initial output. This is the recommended first tool to call. If no device is configured, use list_devices and set_device first.

snapshotA

Capture complete device state: CPU registers (compact), fault status, recent RTT output, and stack dump.

diagnose_crashA

Auto-read and decode ARM Cortex-M fault registers (CFSR, HFSR, MMFAR, BFAR), exception stack frame, and recent errors.

device_infoA

Halt the target and read its registers via SEGGER J-Link. Returns the probe name and a compact register summary. Leaves the target HALTED — call resume when you are done.

haltA

Halt the target CPU

resumeC

Resume the target CPU

resetA

Reset the target device. Halting leaves the core stopped at the reset vector, which is where you want it before flashing, or to watch startup run.

stepA

Step one CPU instruction

read_memoryB

Read memory from the target. Returns clean hex dump.

write_memoryB

Write a 32-bit value to memory

read_registersA

Read all CPU registers (compact format, FP only if non-zero).

read_registerA

Read a specific CPU register by name

flashC

Flash firmware to the target device

eraseB

Erase target flash memory

list_peripheralsA

List the target's peripherals and base addresses, from its CMSIS-SVD description. Requires an SVD file to be configured.

read_peripheralA

Read every register of a peripheral from the target and decode each one's bit fields by name. This is read_memory plus the meaning of what was read.

decode_registerA

Decode a value into named bit fields using the target's SVD. Reads from the device unless a value is supplied — useful for interpreting a number you already have.

set_breakpointC

Set a hardware breakpoint

clear_breakpointsA

Clear all breakpoints, including any left armed in the debug hardware by an earlier session

gdb_server_startA

Start SEGGER J-Link GDB server

gdb_server_stopA

Stop SEGGER J-Link GDB server and disconnect RTT

gdb_server_statusB

Get GDB server, RTT, and telnet proxy status

gdb_connectA

Connect a GDB client to the running GDB server. Enables source-level debugging: backtraces, variable inspection, conditional breakpoints, stepping by source line. Optionally load an ELF file for symbol info.

gdb_commandA

Send any GDB command and get the response. For execution commands (continue, step, next, finish, until), blocks until the target stops or times out. If the target doesn't stop, use gdb_wait to poll. Examples: 'bt' (backtrace), 'info threads', 'print myVar', 'break main', 'continue', 'next', 'step', 'finish', 'info registers', 'x/10xw 0x20000000'

gdb_waitA

Poll for target stop after a continue/step that timed out. Returns the stop reason (breakpoint hit, signal, finished stepping, etc.) when the target halts.

gdb_loadA

Load an ELF file into GDB. By default loads symbols only (for source-level debugging: backtraces with file:line, variable names). Set flash=true to also program it onto the target.

gdb_backtraceB

Get a stack backtrace. With debug symbols loaded, shows function names, file paths, and line numbers.

gdb_disconnectA

Disconnect the GDB client (does not stop the GDB server)

rtt_connectB

Connect to RTT

rtt_disconnectC

Disconnect from RTT

rtt_readA

Read RTT log lines (clean, parsed Zephyr format). Non-destructive — reading does not consume the buffer. Returns the NEWEST lines by default; oldest:true returns the start of the buffer. Note the buffer spans reflashes: its oldest lines may be from firmware you have since replaced. rtt_clear drops them.

rtt_searchA

Search/filter RTT logs by level, module, or regex

rtt_sendC

Send data to device via RTT down-channel

rtt_statusA

Read SEGGER's RTT control block on the target: is it initialised, how much has the firmware written, and how much has the probe collected. Use this when RTT is silent — it separates a quiet device from a probe that stopped collecting, which look identical from rtt_read.

rtt_clearB

Clear RTT buffer

telnet_proxy_startA

Start a TCP relay that re-serves the RTT stream on another port, so an external decoder (Trice, Pigweed, or your own) can consume it alongside this server. It relays bytes; it does not decode them.

telnet_proxy_stopB

Stop telnet proxy

telnet_proxy_statusA

Get telnet proxy status

telnet_proxy_readC

Read raw data from telnet proxy buffer

probe_commandC

Execute raw SEGGER J-Link commands

get_configC

Get current probe and server configuration

Prompts

Interactive templates invoked by user choice

NameDescription
debug-embeddedStart an embedded debugging session.
crash-analysisDiagnose a crash. Use diagnose_crash tool.
analyze-rtt-outputAnalyze RTT output for errors and anomalies
peripheral-inspectInspect peripheral registers

Resources

Contextual data attached and managed by the client

NameDescription
rtt-outputClean RTT output (ANSI stripped, Zephyr logs parsed)
gdb-server-logRecent SEGGER J-Link GDB server output
system-statusOverall system status

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/Klievan/jlink-mcp'

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