Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SVD_PATHNoPath to a CMSIS-SVD file; without it peripheral reads stay raw hex.
PROBE_TYPENoProbe backend: `jlink`, `openocd`, `blackmagic`.jlink
JLINK_SPEEDNoConnection speed in kHz.4000
BMP_GDB_PATHNoPath to GDB binary.arm-none-eabi-gdb
JLINK_DEVICENoTarget device (e.g., `nRF52840_XXAA`, `STM32F407VG`).Unspecified
JLINK_SERIALNoJ-Link serial number (multi-probe).
JLINK_GDB_PORTNoGDB server port.2331
JLINK_RTT_ADDRNoAddress of the RTT control block (your `_SEGGER_RTT` symbol). J-Link finds this by scanning RAM but never reports it back — supplying it is what lets RTT survive a target reset.Auto
JLINK_RTT_PORTNoRTT telnet port.19021
OPENOCD_BINARYNoPath to openocd binary.openocd
OPENOCD_TARGETNoTarget config file.target/stm32f4x.cfg
BMP_SERIAL_PORTNoBMP serial port./dev/ttyACM0
JLINK_INTERFACENoDebug interface: `SWD` or `JTAG`.SWD
BMP_TARGET_INDEXNoTarget index after scan.1
OPENOCD_GDB_PORTNoGDB server port.3333
JLINK_INSTALL_DIRNoPath to SEGGER J-Link installation.Auto-detect
OPENOCD_INTERFACENoInterface config file.interface/stlink.cfg
OPENOCD_TELNET_PORTNoTelnet command port.4444

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

set_serial_numberA

Set the debug probe serial number at runtime. Required when multiple probes are connected to select which one to communicate with. Run list_devices to see connected serial numbers.

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

TDQS

B3.3/5.0

Scored across 48 tools

Disambiguation3/5

Most groups are clearly separated (gdb_*, rtt_*, telnet_proxy_*, flash/memory/register), and descriptions actively disambiguate tricky pairs like list_devices vs search_devices and rtt_status vs rtt_read. However there are several genuine overlaps: gdb_command is a catch-all that subsumes gdb_backtrace and register/memory reads; device_info and snapshot both halt and dump registers; diagnose_crash overlaps snapshot's fault capture; flash vs gdb_load(flash=true) vs erase are alternative programming paths. Four separate '*_status'/'check_setup'/'get_config' tools also force the agent to guess which health check to call.

Naming Consistency4/5

The dominant pattern is snake_case verb_noun with sensible subsystem prefixes (gdb_*, rtt_*, telnet_proxy_*), which is easy to scan. Deviations are minor but present: bare verbs with no object (flash, erase, halt, resume, step, reset) and mixed forms like get_config alongside device_info, check_setup, and snapshot. No case-style mixing, so it stays predictable.

Tool Count2/5

48 tools is well past the heavy threshold for a single debugging server; the domain is broad but several clusters (four status/config tools, three RTT-read paths, snapshot/diagnose_crash/device_info) could be consolidated. The surface is also top-heavy with narrowly scoped helpers (set_rtt_address, set_serial_number, set_svd_path) that are configuration rather than operations. An agent must triage a large menu before every task.

Completeness4/5

Coverage is strong across the lifecycle: probe/device discovery and configuration, flash/erase, memory and register reads, breakpoints, run control, source-level GDB, RTT streaming, telnet relay, and SVD-based peripheral decoding and crash analysis. Remaining gaps are minor: no individual breakpoint delete/list, no register write, no watchpoints. Agents can work around these via gdb_command or probe_command.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues