Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JLINK_SVD_DIRNoDirectory from which SVD files are loaded. If no valid device-specific SVD file is configured, register definitions will not be fabricated.

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": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_jlink_devicesB

List all connected JLink devices / 列出所有连接的 JLink 设备.

Returns a list of all connected JLink debuggers in the system. 返回系统中所有已连接的 JLink 调试器列表。 Each device contains serial number, product name, and connection type. 每个设备包含序列号、产品名称和连接类型。

Returns: Device information list / 设备信息列表

connect_deviceA

Connect to JLink device / 连接到 JLink 设备.

Connects to the specified JLink debugger. If no serial number is specified, connects to the first available device. 连接到指定的 JLink 调试器。如果不指定序列号,则连接第一个可用设备。

Args: serial_number: Device serial number (optional) / 设备序列号(可选) interface: Target interface type (SWD/JTAG, optional, defaults to runtime config) / 目标接口类型(SWD/JTAG,可选,默认取运行时配置) chip_name: Target chip name (e.g., STM32F407VG, optional) / 目标芯片名称(如 STM32F407VG,可选)

Returns: Connection result / 连接结果

disconnect_deviceA

Disconnect JLink device / 断开 JLink 设备连接.

Disconnects the current active JLink connection and releases device resources. 断开当前活动的 JLink 连接,释放设备资源。

Returns: Disconnection result / 断开结果

get_connection_statusB

Get current connection status / 获取当前连接状态.

Queries JLink connection status, target chip connection status, voltage, and other information. 查询 JLink 连接状态、目标芯片连接状态、电压等信息。

Returns: Connection status information / 连接状态信息

match_chip_nameA

Intelligently match chip name / 智能匹配芯片名称.

Matches simplified chip names (e.g., FC7300F4MDD) to complete chip names (e.g., FC7300F4MDDxXxxxT1C). Supports prefix matching, contains matching, and fuzzy matching. 将简化的芯片名称(如 FC7300F4MDD)匹配到完整的芯片名称 (如 FC7300F4MDDxXxxxT1C)。支持前缀匹配、包含匹配和模糊匹配。

Args: chip_name: Chip name (can be simplified or complete) / 芯片名称(可以是简化名称或完整名称)

Returns: Match result, including matched (matched complete name) and all_matches (all matches) / 匹配结果,包含 matched(匹配到的完整名称)和 all_matches(所有匹配项)

systemview_captureA

Capture SystemView binary events and RTOS runtime summary / 采集 SystemView 并分析 RTOS.

Target must run instrumented firmware. Exclusive RTT; stop other recorders. Foreground call: up to 2 seconds discovery plus 10 seconds capture. Single core only. channel selects the SysView UP buffer, not RTT control block.

systemview_decodeB

Decode raw SystemView RTT bytes and summarize runtime / 离线解码 SystemView 二进制流.

Input is Base64 of raw RTT bytes, not a .SVDat file. Maximum 4 MiB. timestamp_hz overrides INIT timestamp clock, not necessarily CPU clock.

inspect_projectC

Inspect CubeMX MCU, FreeRTOS version, ELF and RTT/SystemView evidence / 检测工程能力.

plan_project_debugC

Plan project-aware flash/debug without hardware writes / 只读生成烧录调试计划.

deploy_projectA

Flash compiled STM32 ELF/HEX/BIN, verify all bytes, run, auto-select monitoring / 自动烧录运行并监控.

Requires exact chip and unique probe/artifact or explicit selection. Programs internal flash. sample_cpu briefly halts CPU during monitoring; default false preserves timing.

start_runtime_monitorA

Start background J-Link/RTT/SystemView monitor / 启动后台运行状态监控.

Reserves hardware until stop/duration/trace byte limit. Poll get_runtime_report for updates. Other hardware tools are unavailable during monitoring. No CPU halts unless sample_cpu=true.

get_runtime_reportB

Get runtime evidence and scheduling feedback / 获取运行状态、故障及调度反馈.

Pass previous last_sequence to retrieve only new messages. Absence of findings is not a proof of correctness.

stop_runtime_monitorA

Stop monitoring and release hardware for breakpoint/SVD/debug operations / 停止监控并释放硬件.

runtime_snapshotA

Read Cortex-M fault evidence; optionally halt and restore running state / 可选短暂停机检查故障.

Stop background monitor first. Sticky fault status describes history, not necessarily an active fault.

export_runtime_traceC

Export captured raw SystemView binary and JSON report to local files / 导出采集数据及报告.

start_firmware_watchA

Watch a compiled artifact, auto flash stable changes, run and monitor / 监听编译产物并自动烧录监控.

Explicitly enables repeated hardware writes for this selected artifact. Waits for 1 second stability. One deployment attempt per SHA256. Does not execute builds or modify the firmware source. Requires confirm=True: this tool writes Flash repeatedly without further prompts.

get_firmware_watch_statusB

Get compiled firmware watcher status and last deployment result / 查询编译监听及部署结果.

stop_firmware_watchA

Stop future automatic deployments; firmware keeps running / 停止后续自动部署,固件继续运行.

toolchain_detectA

Discover CMake/Ninja/arm-none-eabi/J-Link toolchain / 探测本机嵌入式工具链.

Resolution order: jlink-project.json build.toolchain → EMBEDDED_* env vars → PATH → sibling of arm-none-eabi-gcc → common install locations. Returns paths, versions and build_ready/debug_ready flags. Read-only.

build_statusB

Report manifest, toolchain, firmware SHA256 and size / 盘点工程与编译产物状态.

Read-only. Recommended as the first tool call in a headless session.

build_projectA

Configure + build a CMake/Ninja/arm-none-eabi project / 编译工程并产出证据.

Uses CMakePresets.json when the preset exists, else explicit Ninja configure. Returns raw compiler output, ELF SHA256, size output, warning/error counts. Never touches hardware and does not modify source files.

workflow_pipelineA

One-call build → host tests → optional flash/run → optional evidence / 一体化流水线.

Safe by default: flash=False. flash=True requires confirm=True (real Flash write). host_test_enabled=True runs native unit tests BEFORE any Flash write; the stage is skipped when no driver/compiler exists. host_test_opt="both" runs -O0 and -O3. observe_s>0 starts a short monitor, captures one report, then releases hardware.

host_testA

Compile and run host (native) unit tests, no hardware needed / 主机单元测试.

Runs the project's driver (auto-detected Tests/run_host_tests.py) with a host C compiler. opt="both" runs -O0 and -O3 to catch optimization-sensitive bugs. On failure it re-runs per test with --only to name the failing cases. Use it standalone, or via workflow_pipeline as a pre-flash gate.

gdb_batchA

One-shot symbol-level debug via J-Link GDB Server / 无 VSCode 的符号级调试.

Spawns JLinkGDBServer if the port is free, runs arm-none-eabi-gdb -batch with -ex commands (bt / info registers / x / disassemble), then stops the server. Stop runtime monitor first (hardware is exclusive).

get_target_infoB

Get target device (MCU) information / 获取目标设备(MCU)信息.

Reads detailed information about the connected target chip, including device name, core type, Flash/RAM size, etc. 读取连接的目标芯片的详细信息,包括设备名称、内核类型、Flash/RAM 大小等。

Returns: Target device information / 目标设备信息

get_target_voltageB

Get target voltage / 获取目标电压.

Reads the supply voltage of the target chip. 读取目标芯片的供电电压。

Returns: Voltage information / 电压信息

scan_target_devicesB

Scan devices on target bus / 扫描目标总线上的设备.

Scans all devices on the JTAG chain or SWD bus. 扫描 JTAG 链或 SWD 总线上的所有设备。

Returns: Scan results / 扫描结果

list_device_patchesB

List all loaded device patches and their supported devices / 列出所有已加载的设备补丁及其支持的设备.

Lists all available device patches (e.g., Flagchip) and their supported device lists. 列出所有可用的设备补丁(如 Flagchip 等)及其支持的设备列表。

Returns: Device patch list / 设备补丁列表

read_memoryB

Read memory at specified address / 读取指定地址的内存.

Args: address: Start address / 起始地址 size: Read size (bytes, max 64KB) / 读取大小(字节,最大 64KB) width: Access width (8/16/32 bits, default 32) / 访问宽度(8/16/32位,默认 32)

Returns: Memory read result / 内存读取结果

write_memoryC

Write to memory / 写入内存.

Args: address: Start address / 起始地址 data: Data to write / 要写入的数据 width: Access width (8/16/32 bits, default 32) / 访问宽度(8/16/32位,默认 32)

Returns: Write result / 写入结果

read_registersB

Read CPU registers / 读取 CPU 寄存器.

Args: register_names: Register name list (optional, None reads all general-purpose registers) / 寄存器名称列表(可选,None 则读取所有通用寄存器)

Returns: Register values / 寄存器值

write_registerC

Write single register / 写入单个寄存器.

Args: register_name: Register name / 寄存器名称 value: Register value / 寄存器值

Returns: Write result / 写入结果

erase_flashB

Erase Flash / 擦除 Flash.

Args: start_address: Start address (optional) / 起始地址(可选) end_address: End address (optional) / 结束地址(可选) chip_erase: Whether to perform chip erase (wipes the bootloader too) / 是否整片擦除(会连 Bootloader 一起抹掉) confirm: Required: erasing is irreversible / 必填:擦除不可逆

Returns: Erase result / 擦除结果

program_flashC

Program firmware to Flash / 烧录固件到 Flash.

Args: address: Start address / 起始地址 data: Data to program / 要烧录的数据 verify: Whether to verify after programming / 烧录后是否校验

Returns: Programming result / 烧录结果

verify_flashC

Verify Flash content / 校验 Flash 内容.

Args: address: Start address / 起始地址 data: Expected data / 期望的数据

Returns: Verification result / 校验结果

reset_targetC

Reset target chip / 复位目标芯片.

Args: reset_type: Reset type (normal/halt/core) / 复位类型(normal/halt/core)

Returns: Reset result / 复位结果

halt_cpuC

Halt CPU / 暂停 CPU.

Returns: Halt result / 暂停结果

run_cpuC

Run CPU / 运行 CPU.

Returns: Run result / 运行结果

step_instructionB

Step one instruction / 单步执行一条指令.

Returns: Step result / 单步执行结果

get_cpu_stateC

Get CPU state / 获取 CPU 状态.

Returns: CPU state information / CPU 状态信息

set_breakpointC

Set breakpoint / 设置断点.

Args: address: Breakpoint address / 断点地址

Returns: Set result / 设置结果

clear_breakpointC

Clear breakpoint / 清除断点.

Args: address: Breakpoint address / 断点地址

Returns: Clear result / 清除结果

rtt_startC

Start RTT / 启动 RTT.

Args: buffer_index: RTT buffer index / RTT 缓冲区索引 read_mode: Read mode / 读取模式 timeout_ms: Timeout (milliseconds) / 超时时间(毫秒)

Returns: Start result / 启动结果

rtt_stopC

Stop RTT / 停止 RTT.

Returns: Stop result / 停止结果

rtt_readC

Read RTT log / 读取 RTT 日志.

Args: buffer_index: RTT buffer index / RTT 缓冲区索引 size: Read size (bytes) / 读取大小(字节) timeout_ms: Timeout (milliseconds) / 超时时间(毫秒)

Returns: Read result / 读取结果

rtt_writeC

Write data to RTT / 向 RTT 写入数据.

Args: data: Data to write / 要写入的数据 buffer_index: RTT buffer index / RTT 缓冲区索引

Returns: Write result / 写入结果

rtt_get_statusC

Get RTT status / 获取 RTT 状态.

Returns: RTT status information / RTT 状态信息

start_gdb_serverB

Start GDB Server / 启动 GDB Server.

Args: host: Listen address / 监听地址 port: Listen port / 监听端口 device: Device name / 设备名称 interface: Interface type (SWD/JTAG, default JTAG) / 接口类型(SWD/JTAG,默认 JTAG) speed: Interface speed (kHz) / 接口速度(kHz)

Returns: Start result / 启动结果

stop_gdb_serverC

Stop GDB Server / 停止 GDB Server.

Returns: Stop result / 停止结果

get_gdb_server_statusC

Get GDB Server status / 获取 GDB Server 状态.

Returns: GDB Server status information / GDB Server 状态信息

list_svd_devicesB

List all devices that support SVD / 列出所有支持 SVD 的设备.

Returns a list of all devices with SVD files loaded in the system. 返回系统中所有已加载 SVD 文件的设备列表。

Returns: Device list / 设备列表

get_svd_peripheralsC

Get all peripherals of specified device / 获取指定设备的所有外设.

Args: device_name: Device name (e.g., FC4150F1MBSxXxxxT1A) / 设备名称(如 FC4150F1MBSxXxxxT1A)

Returns: Peripheral list / 外设列表

get_svd_registersC

Get all registers of specified peripheral / 获取指定外设的所有寄存器.

Args: device_name: Device name / 设备名称 peripheral_name: Peripheral name / 外设名称

Returns: Register list / 寄存器列表

read_register_with_fieldsB

Read register and parse fields (combining SVD and actual read) / 读取寄存器并解析字段(结合 SVD 和实际读取).

Args: device_name: Device name / 设备名称 peripheral_name: Peripheral name / 外设名称 register_name: Register name / 寄存器名称

Returns: Register value and field parsing result / 寄存器值和字段解析结果

parse_register_valueB

Parse register value (parse only, no hardware read) / 解析寄存器值(仅解析,不读取硬件).

Args: device_name: Device name / 设备名称 peripheral_name: Peripheral name / 外设名称 register_name: Register name / 寄存器名称 value: Register value / 寄存器值

Returns: Register value and field parsing result / 寄存器值和字段解析结果

get_usage_guidanceA

Get JLink MCP tool usage guidance / 获取 JLink MCP 工具使用指南.

Provides categories, descriptions, and usage examples for all available tools. 提供所有可用工具的分类、描述和使用示例。

Args: category: Tool category (optional), supports: / 工具分类(可选),支持: - connection: Connection management / 连接管理 - device_info: Device information / 设备信息 - memory: Memory operations / 内存操作 - flash: Flash operations / Flash 操作 - debug: Debug control / 调试控制 - rtt: RTT logging / RTT 日志 - svd: SVD register parsing / SVD 寄存器解析 None means return all categories / None 表示返回所有分类 include_examples: Whether to include usage examples / 是否包含使用示例

Returns: Usage guide, including tool categories, descriptions, and common scenarios / 使用指南,包含工具分类、描述和常见场景

get_best_practicesA

Get best practices for specified task type / 获取指定任务类型的最佳实践.

Args: task_type: Task type, supports: / 任务类型,支持: - read_registers: Read registers / 读取寄存器 - connect_device: Connect device / 连接设备 - memory_operations: Memory operations / 内存操作 - flash_operations: Flash operations / Flash 操作 - debug: Debug control / 调试控制

Returns: Best practices, including recommended workflows, forbidden operations, and common errors / 最佳实践,包含推荐流程、禁止操作和常见错误

list_scenariosB

List all available usage scenarios / 列出所有可用的使用场景.

Returns: Scenario list, including descriptions and expected times / 场景列表,包含描述和预期时间

get_forbidden_operationsB

Get list of forbidden operations / 获取禁止的操作列表.

Returns: List of forbidden operations and their reasons / 禁止操作列表和原因说明

get_server_configB

Get current server configuration / 获取当前服务器配置.

Returns: Server configuration snapshot / 服务器配置快照

get_server_capabilitiesB

Get current server capabilities / 获取当前服务器能力状态.

Returns: Server capability summary / 服务器能力摘要

diagnose_environmentC

Diagnose environment and resource availability / 诊断环境与资源可用性.

Returns: Environment diagnosis report / 环境诊断报告

semantic_search_toolsA

Semantic Search Tools - Recommend relevant tools based on natural language query / 语义搜索工具 - 根据自然语言查询推荐相关工具.

Uses vector embedding technology to intelligently match user queries with available tools. 使用向量嵌入技术,智能匹配用户查询与可用工具。

This can significantly reduce AI model token consumption (expected 95-99% savings). 可以大幅减少 AI 模型的 Token 消耗(预期节省 95-99%)。

Examples / 示例: - "如何读取寄存器?" (How to read registers?) → Returns read_registers, read_register_with_fields - "如何烧录固件?" (How to flash firmware?) → Returns erase_flash, program_flash, verify_flash - "如何查看实时日志?" (How to view real-time logs?) → Returns rtt_start, rtt_read - "read memory" → Returns read_memory, read_registers - "connect to device" → Returns connect_device, list_jlink_devices

Args: query: User query in natural language (Chinese or English) / 用户自然语言查询(中文或英文) top_k: Number of tools to return (default: 3, range: 1-10) / 返回工具数量(默认:3,范围:1-10) threshold: Similarity threshold (default: 0.5, range: 0-1) / 相似度阈值(默认:0.5,范围:0-1)

Returns: Search results containing relevant tools with scores / 包含相关工具及分数的搜索结果

Notes: - This tool requires OpenAI API key to be configured / 此工具需要配置 OpenAI API Key - First search will generate embeddings for all tools (may take 1-2 seconds) / 首次搜索将为所有工具生成嵌入(可能需要 1-2 秒) - Subsequent searches will be fast (<50ms) due to caching / 后续搜索将很快(<50ms),因为缓存 - Supports both Chinese and English queries / 支持中文和英文查询

get_semantic_statsB

Get Semantic Search Statistics / 获取语义搜索统计信息.

Returns statistics about the semantic search system including: 返回语义搜索系统的统计信息,包括:

  • Total number of tools / 工具总数

  • Number of categories / 分类数量

  • Initialization status / 初始化状态

  • Embedding cache statistics / 嵌入缓存统计

Returns: Statistics about the semantic search system / 语义搜索系统的统计信息

get_system_promptB

Get system prompt or custom prompt / 获取系统提示词或自定义提示词.

Args: prompt_name: Prompt name (optional), None returns system prompt / 提示词名称(可选),None 则返回系统提示词

Returns: Prompt content / 提示词内容

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

C2.8/5.0

Scored across 65 tools

Disambiguation3/5

Core hardware operations are mostly distinguishable, but several clusters overlap: runtime monitoring vs SystemView vs RTT capture, deploy_project vs program_flash vs workflow_pipeline vs firmware watch, and multiple meta/guidance tools. Detailed descriptions help, but an agent must read carefully to choose the right entry point.

Naming Consistency3/5

Most names are readable snake_case, but conventions are mixed: verb_noun (get_runtime_report, read_memory), noun_verb (rtt_start, systemview_capture, toolchain_detect), and noun_noun (runtime_snapshot, workflow_pipeline, host_test). The pattern is not fully predictable, though it remains understandable.

Tool Count1/5

With 65 tools, the surface is far beyond what an agent can manage efficiently, including many meta-guidance, status, and overlapping workflow tools. Even for a broad embedded debug/build/monitor server, this is an extreme count that makes tool selection costly.

Completeness4/5

Coverage is very broad: connection, device info, memory/register access, flash, debug control, RTT, SystemView, build/test/deploy, and runtime monitoring are all present. Minor gaps remain, such as breakpoint listing/watchpoints and some higher-level project lifecycle operations, but core workflows are covered.

Maintenance

ActivityMaintained
ResponsivenessOutdated data