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

Capabilities

Features and capabilities supported by this server

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 debug probes and show what hardware is attached. Use this first if you don't know what device is connected.

set_deviceA

Set the target device name at runtime. Required before any debugging commands will work. 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

Get connected device info via SEGGER J-Link. Returns probe type, target CPU, and compact register summary.

haltA

Halt the target CPU

resumeC

Resume the target CPU

resetC

Reset the target device

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

set_breakpointC

Set a hardware breakpoint

clear_breakpointsB

Clear all breakpoints

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 recent RTT log lines (clean, parsed Zephyr format)

rtt_searchA

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

rtt_sendC

Send data to device via RTT down-channel

rtt_clearB

Clear RTT buffer

telnet_proxy_startB

Start TCP proxy for Trice/Pigweed detokenizer

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