Skip to main content
Glama

gdb_batch

Run one-shot symbol-level STM32 debugging through J-Link GDB Server, executing batch GDB commands for backtraces, registers, memory reads, and disassembly, then stopping the server.

Instructions

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

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_path": "<project_path>"
    },
    "name": "gdb_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNo
commandsNo
elf_pathNo
chip_nameNo
interfaceNoSWD
timeout_sNo
project_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose key side effects: it may spawn JLinkGDBServer only when the port is free, and it stops the server afterwards. It also flags hardware exclusivity. It does not say what happens if the port is occupied, how failures/timeouts surface, or whether the server is left running on error.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and compact, with the core action first, then mechanics, then the prerequisite. The bilingual restatement of the first sentence adds no information for a single-language reader but does not obscure the content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, and the process-lifecycle behavior is covered. However, for a seven-parameter tool with zero annotation coverage that spawns an external server and executes arbitrary debug commands, the unexplained parameters and unstated error/timeout behavior leave real gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across seven parameters, so the description must compensate and it only partly does: it implies the commands parameter takes -ex GDB commands and that port relates to the GDB server bind. elf_path, chip_name, interface, timeout_s, and project_path are left entirely to the schema's bare titles and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: one-shot symbol-level debug via J-Link GDB Server, then enumerates the concrete operation (spawn server, run arm-none-eabi-gdb -batch with -ex commands such as bt / info registers / x / disassemble, stop server). This is visibly distinct from the persistent-server siblings start_gdb_server and stop_gdb_server.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operational context: it is a one-shot batch invocation, and the runtime monitor must be stopped first because the hardware is exclusive. It does not explicitly contrast with interactive alternatives or say what to do if you need multi-step debugging, so it stops short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.