gdb_mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gdb_mcpset breakpoint at main and run the program"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GDB MCP Server
An MCP (Model Context Protocol) server that provides AI assistants with programmatic access to GDB debugging sessions. This allows AI models to interact with debuggers in the same way IDEs like VS Code and CLion do, using the GDB/MI (Machine Interface) protocol.
Features
Full GDB Control: Start sessions, execute commands, control program execution
Thread Analysis: Inspect threads, get backtraces, analyze thread states
Breakpoint Management: Set conditional breakpoints, temporary breakpoints
Hardware Breakpoints: Use CPU debug registers when software breakpoints are not suitable
Multi-line Commands: Send
commands,define,python, and other GDB command blocksBlocking Execution Control:
run,continue,step,next, andfinishwait until the target stopsVariable Inspection: Evaluate expressions, inspect variables and registers
Core Dump Analysis: Load and analyze core dumps with custom initialization
Flexible Initialization: Run GDB scripts or commands on startup
Related MCP server: gdb and rr Debugging
Fixes in This Fork
This fork focuses on making GDB MCP easier for AI agents to use in real debugging sessions:
Fixed execution commands returning too early.
run,continue,step,next, andfinishnow wait until GDB reports*stopped, so breakpoint hits and crashes are returned with the same command.Added a top-level
stoppedobject to execution results, including stop reason, frame, thread, and breakpoint number when GDB provides them.Fixed multi-line GDB command blocks.
commands ... end,define ... end,python ... end,if ... end, andwhile ... endno longer deadlock.Added per-command
timeout_secfor long-running debug operations.Added hardware breakpoint support with
hardware=true.Added an SSH stdio bridge example for running the MCP server on a remote VM while the MCP client runs locally.
Architecture
This server uses the GDB/MI (Machine Interface) protocol, which is the same interface used by professional IDEs. It provides:
Structured, machine-parseable output
Full access to GDB's debugging capabilities
Reliable command execution and response handling
Installation
Prerequisites
Python 3.10 or higher
GDB installed and available in PATH
Quick Start
# Install pipx if needed
python3 -m pip install --user pipx
python3 -m pipx ensurepath
# Install gdb-mcp-server
cd /path/to/gdb-mcp
pipx install .For alternative installation methods (virtual environment, manual setup), see INSTALL.md.
Configuration
Claude Desktop
Add this to your Claude Desktop configuration file:
Location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration:
{
"mcpServers": {
"gdb": {
"command": "gdb-mcp-server"
}
}
}For other installation methods and MCP clients, see INSTALL.md.
opencode
Add a project-level opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"gdb": {
"type": "local",
"command": ["gdb-mcp-server"],
"enabled": true,
"timeout": 20000
}
}
}For remote VM debugging, run the MCP server over SSH with the bridge example:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"gdb_remote": {
"type": "local",
"command": ["python", "examples/gdb_mcp_ssh_bridge.py"],
"enabled": true,
"timeout": 20000,
"env": {
"GDB_MCP_SSH_HOST": "your-vm-host",
"GDB_MCP_SSH_USER": "root",
"GDB_MCP_REMOTE_COMMAND": "cd /path/to/gdb-mcp && GDB_MCP_LOG_LEVEL=ERROR exec ./venv/bin/python -m gdb_mcp"
}
}
}
}Use SSH keys when possible. If password auth is required, set GDB_MCP_SSH_PASSWORD in your shell environment instead of committing it to opencode.json.
Start opencode from the project directory and tell the agent:
use gdb_remoteEnvironment Variables
The GDB MCP Server supports the following environment variables:
GDB_PATH
Specify the path to the GDB executable to use. This is useful when:
You have multiple GDB versions installed
GDB is installed in a non-standard location
You want to use a custom or patched GDB build
Default: gdb (resolved via system PATH)
Example:
export GDB_PATH=/usr/local/bin/gdb-13.2
gdb-mcp-serverNote: The gdb_path parameter in the gdb_start_session tool overrides this environment variable if both are specified.
GDB_MCP_LOG_LEVEL
Set the logging level for the server.
Default: INFO
Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
Example:
export GDB_MCP_LOG_LEVEL=DEBUG
gdb-mcp-serverAvailable Tools
The GDB MCP Server provides 22 tools for controlling GDB debugging sessions:
Session Management:
gdb_start_session- Start a new GDB session with optional initializationgdb_execute_command- Execute GDB commands (CLI or MI format)gdb_call_function- Call a function in the target process (dedicated tool for separate permissioning)gdb_get_status- Get current session statusgdb_stop_session- Stop the current session
Thread & Frame Navigation:
gdb_get_threads- List all threadsgdb_select_thread- Select a specific threadgdb_get_backtrace- Get stack trace for a threadgdb_select_frame- Select a specific stack framegdb_get_frame_info- Get information about the current frame
Breakpoint Management:
gdb_set_breakpoint- Set breakpoints with optional conditions, temporary mode, or hardware modegdb_list_breakpoints- List all breakpoints with structured datagdb_delete_breakpoint- Delete a breakpoint by numbergdb_enable_breakpoint- Enable a breakpointgdb_disable_breakpoint- Disable a breakpoint
Execution Control:
gdb_continue- Continue executiongdb_step- Step into functionsgdb_next- Step over functionsgdb_interrupt- Pause a running program
Data Inspection:
gdb_evaluate_expression- Evaluate expressionsgdb_get_variables- Get local variablesgdb_get_registers- Get CPU registers
For detailed documentation of each tool including parameters, return values, and examples, see TOOLS.md.
Usage Examples
Example 1: Analyzing a Core Dump
User: "Load the core dump at /tmp/core.12345, set the sysroot to /opt/sysroot, and tell me how many threads there were when it crashed."
AI Actions:
Start session with init commands:
{
"init_commands": [
"file /path/to/executable",
"core-file /tmp/core.12345",
"set sysroot /opt/sysroot"
]
}Get threads:
gdb_get_threadsReport: "There were 8 threads when the program crashed."
Example 2: Conditional Breakpoint Investigation
User: "Set a breakpoint at process_data but only when the count variable is greater than 100, then continue execution."
AI Actions:
Set conditional breakpoint:
{
"location": "process_data",
"condition": "count > 100"
}Continue execution:
gdb_continueWhen hit, inspect state
For more detailed usage examples and workflows, see examples/USAGE_GUIDE.md and examples/README.md.
Advanced Usage
Custom GDB Initialization Scripts
Create a .gdb file with your setup commands:
# setup.gdb
file /path/to/myprogram
core-file /path/to/core
# Set up symbol paths
set sysroot /opt/sysroot
set solib-search-path /opt/libs:/usr/local/lib
# Convenience settings
set print pretty on
set print array on
set pagination offThen use it:
{
"init_commands": ["source setup.gdb"]
}Python Initialization Scripts
You can also use GDB's Python API:
# init.py
import gdb
gdb.execute("file /path/to/program")
gdb.execute("core-file /path/to/core")
# Custom analysisUse with:
{
"init_commands": ["source init.py"]
}Working with Running Processes
While this server primarily works with core dumps and executables, you can attach to running processes:
{
"init_commands": [
"attach 12345" // PID of running process
]
}Note: This requires appropriate permissions (usually root or same user).
Troubleshooting
Common Issues
GDB Not Found
which gdb
gdb --versionLong-running Execution
Execution commands block until the target stops, exits, crashes, or times out. For long-running programs, pass a larger timeout_sec to gdb_execute_command, gdb_continue, gdb_step, or gdb_next.
If the target is still running after the timeout, use gdb_interrupt to pause it.
Program States:
Not started: Use
gdb_execute_commandwith "run" or "start"Running: Program is executing - use
gdb_interruptto pause itPaused (at breakpoint): Use
gdb_continue,gdb_step,gdb_next, inspect variablesFinished: Program has exited - restart with "run" if needed
Missing Debug Symbols
Always check the warnings field in gdb_start_session response! Compile your programs with the -g flag.
For detailed troubleshooting, installation issues, and more solutions, see INSTALL.md.
How It Works
GDB/MI Protocol: The server communicates with GDB using the Machine Interface (MI) protocol, the same interface used by IDEs.
pygdbmi Library: We use the excellent
pygdbmilibrary to handle the low-level protocol details and response parsing.MCP Integration: The server exposes GDB functionality as MCP tools, allowing AI assistants to:
Understand the available debugging operations
Execute commands with proper parameters
Interpret structured responses
Session Management: A single GDB session is maintained per server instance, allowing stateful debugging across multiple tool calls.
Contributing
Contributions welcome! Areas for improvement:
Additional GDB commands (e.g., watchpoints, memory inspection)
Better error handling and recovery
Enhanced output formatting
License
MIT
References
Available Tools
22 toolsgdb_call_functionA
Call a function in the target process. WARNING: This is a privileged operation that executes code in the debugged program. It can call any function accessible in the current context, including: - Standard library functions: printf, malloc, free, etc. - Program functions: any function defined in the program - System calls via wrappers The function executes with full privileges of the debugged process. Use with caution as it may have side effects and modify program state. Examples: 'printf("debug: x=%d\n", x)', 'my_cleanup_func()', 'strlen(str)'. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| function_call | Yes | Function call expression (e.g., 'printf("hello\n")' or 'my_func(arg1, arg2)') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully discloses that this is a privileged operation executing code in the debugged process, with side effects and state modification. It lists examples of callable functions and warns of full privileges.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: it starts with the purpose, includes a warning, provides examples, and states prerequisite. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, the description covers purpose, prerequisites, examples, and warnings, making it complete for a privileged function-call tool. The return value is not critical as the tool's action is the main point.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds context by explaining the source of session_id and giving examples of function_call expressions, enhancing understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it calls a function in the target process, with specific examples and warning about it being a privileged operation. It distinguishes from siblings like gdb_evaluate_expression by focusing on function calls and side effects.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use (to call functions in the debugged process) and prerequisites (session_id from gdb_start_session). It does not explicitly contrast with siblings like gdb_evaluate_expression or gdb_execute_command, but the specialization is clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_continueA
Continue execution of the program until next breakpoint or completion. IMPORTANT: Only use this when the program is PAUSED (e.g., at a breakpoint). If the program hasn't been started yet, use gdb_execute_command with 'run' instead. If the program is already running, this will fail - use gdb_interrupt to pause it first. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| timeout_sec | No | Seconds to wait for the program to stop again |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, description carries behavioral burden. It discloses that it continues until next breakpoint or completion, and that it fails if program not paused. Does not mention side effects like program termination, but covers key preconditions and failure modes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise and well-structured. Purpose is front-loaded, followed by important usage conditions in a clear hierarchy. Every sentence adds value, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, no output schema, no nested objects), the description fully covers preconditions, failure modes, and alternatives. Complete for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description adds minimal value beyond schema: session_id source is already in schema, timeout description matches schema. No new meaning added.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Continue execution' and the resource 'program'. It distinguishes itself from siblings by specifying preconditions (program must be paused) and provides alternative tools for different states.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use (program paused), when not to use (if not started or already running), and provides exact alternatives: gdb_execute_command with 'run' for not started, gdb_interrupt to pause if running.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_delete_breakpointA
Delete a breakpoint by its number. Use gdb_list_breakpoints to see breakpoint numbers. Once deleted, the breakpoint cannot be recovered. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| number | Yes | Breakpoint number |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It states the action is irreversible ('cannot be recovered') and mentions the requirement for a session_id. This provides sufficient transparency for a simple deletion tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences long, with the action first, followed by prerequisite and warning. Every sentence adds value, and there is no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no output schema, two straightforward parameters), the description covers purpose, prerequisite (session_id), how to get the number, and the irreversible nature. It is complete for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, but the description adds meaning by specifying that session_id comes from gdb_start_session and that number corresponds to breakpoint numbers from gdb_list_breakpoints. This adds context beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Delete a breakpoint by its number.' This is a specific verb ('delete') and resource ('breakpoint'), and it distinguishes the tool from siblings like gdb_disable_breakpoint (disable vs delete) and gdb_list_breakpoints (list vs delete).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description advises using gdb_list_breakpoints to see breakpoint numbers, indicating a prerequisite step. It also warns that the breakpoint cannot be recovered after deletion. It does not explicitly state when to avoid using this tool, but the context is adequate given the sibling set.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_disable_breakpointA
Disable a breakpoint by its number without deleting it. Disabled breakpoints are not hit but remain in the breakpoint list. Use gdb_enable_breakpoint to re-enable it later. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| number | Yes | Breakpoint number |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, but description fully discloses behavior: disabled breakpoints are not hit but remain in the list. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, highly concise, no fluff. Action is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple mutation tool, description covers action and side effects. However, no mention of return value or success indication; output schema missing but not critical. Could add brief note on expected outcome.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Parameter descriptions already in schema cover both parameters (session_id and number). Description adds context: session_id comes from gdb_start_session and number is the breakpoint number, reinforcing schema but not adding new semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Disable a breakpoint by its number without deleting it', specifying the verb (disable), resource (breakpoint by number), and scope (without deletion). Distinct from sibling tools like gdb_delete_breakpoint and gdb_enable_breakpoint.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly mentions when to use: to disable without deleting, and when to use alternative (gdb_enable_breakpoint for re-enabling). Also notes session_id prerequisite from gdb_start_session.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_enable_breakpointA
Enable a previously disabled breakpoint by its number. Enabled breakpoints will pause execution when hit. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| number | Yes | Breakpoint number |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations, but description explains enabled breakpoints pause execution. Sufficient for a simple enable action; no contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two clear sentences, no fluff, front-loaded with action and purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Low complexity tool; description covers purpose, parameters, and prerequisite. No missing elements for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage 100% with descriptions. Description adds minimal extra context beyond schema; baseline score justified.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool enables a disabled breakpoint by number, with effect of pausing execution. Distinguishes from siblings like gdb_disable_breakpoint and gdb_delete_breakpoint.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly mentions required session_id from gdb_start_session. Does not list alternatives but context implies use after disable; brief but adequate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_evaluate_expressionA
Evaluate a C/C++ expression in the current context and return its value. Can access variables, dereference pointers, call functions, etc. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| expression | Yes | C/C++ expression to evaluate |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must fully disclose behavior. It states the tool can call functions but does not mention potential side effects of such calls. It also fails to specify error handling or the format of the returned value, leaving important behaviors undisclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, starts with the core purpose, and adds necessary context without redundancy. Every sentence is informative and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of an output schema, the description should explain the return value format. It only says 'return its value', which is vague. For a tool that evaluates expressions, more detail on the result type (e.g., string representation) is needed. However, the tool is simple and the description covers the input well.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions, but the description adds context by specifying that session_id comes from gdb_start_session and by listing capabilities (dereference, call functions) that go beyond the schema parameter descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool evaluates a C/C++ expression and returns its value, with specific examples like accessing variables and dereferencing pointers. This distinguishes it from siblings like gdb_call_function which is more specialized.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions the required session_id parameter from gdb_start_session, implying the tool is used only after starting a session. However, it does not explicitly address when not to use it or compare with alternatives like gdb_call_function, though the context is relatively clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_execute_commandA
Execute a GDB command. Supports both CLI and MI commands. CLI commands (like 'info breakpoints', 'list', 'print x') are automatically handled and their output is formatted for readability. Multi-line commands (like 'commands', 'define', 'python') are supported; separate lines with \n. MI commands (starting with '-', like '-break-list', '-exec-run') return structured data. NOTE: For calling functions in the target process, prefer using the dedicated gdb_call_function tool instead of 'call' command, as it provides better structured output and can be separately permissioned. Common examples: 'info breakpoints', 'info threads', 'run', 'print variable', 'list main', 'disassemble func'. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| command | Yes | GDB command to execute | |
| timeout_sec | No | Seconds to wait for this GDB command to complete |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses that CLI commands are auto-handled and formatted, multiline commands supported with , MI commands return structured data. Mentions timeout. No annotations provided, so description carries burden. Could mention potential side effects but adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with front-loaded purpose, then details, then note about alternative. Slightly lengthy but each part adds value; could be more concise but effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 3 parameters, no output schema, and many sibling tools, description is complete: purpose, usage guidelines, parameter details, examples, and alternative tool reference. Agent can correctly select and invoke.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage 100%, description adds significant context: session_id source, command types, timeout default and purpose. Enhances understanding beyond schema with examples and CLI/MI differentiation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the verb 'Execute' and resource 'GDB command'. Distinguishes from sibling tool gdb_call_function by noting preference for function calls. Provides examples of CLI and MI commands.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly explains when to use this tool (executing GDB commands) and when to use gdb_call_function instead. Mentions requirement of session_id from gdb_start_session. Provides common examples.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_get_backtraceB
Get the stack backtrace for a specific thread or the current thread. Shows function calls, file locations, and line numbers. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| thread_id | No | Thread ID (None for current thread) | |
| max_frames | No | Maximum number of frames to retrieve |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Missing annotations put the burden on the description, which only mentions requiring a session_id and the type of output. No disclosure of side effects (e.g., thread state requirements), error behavior, or idempotency. Minimal behavioral info is provided.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with front-loaded main action. No fluff, each sentence adds necessary context. Efficiently communicates purpose, scope, and a prerequisite.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, so the description should explain return format. It only vaguely says 'Shows...' without specifying if output is a list, string, or structured data. Given the complexity of a backtrace, this is incomplete for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with parameter descriptions, but the description adds value by clarifying that thread_id defaults to current thread (None) and explicitly stating session_id is required. This enhances understanding beyond the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get the stack backtrace' with specific details on thread scope and output content (function calls, file locations, line numbers). This distinguishes it from siblings like gdb_get_frame_info (get specific frame) and gdb_get_registers (register values).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like gdb_get_frame_info or gdb_get_threads. The description only implies use for backtrace retrieval but lacks explicit context for selection, such as prerequisites or when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_get_frame_infoA
Get information about the current stack frame. Returns details about the currently selected frame including function name, file location, line number, and address. Use gdb_select_frame to change the current frame first if needed. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full behavioral burden. It states the tool returns details and requires a session_id, but does not disclose behavior on error (e.g., invalid session ID, no current frame), side effects, or rate limits. This leaves some behavioral ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the action, no wasted words. Every sentence adds value: purpose, returns, prerequisite, and usage hint.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given low complexity (1 param, no output schema), the description covers purpose, return fields, and usage context. It lacks explicit details on error cases or return format (e.g., data types), but is sufficient for an experienced user.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (session_id documented in schema). The description adds no new parameter information beyond restating the prerequisite. Per guidelines, baseline is 3 when coverage is high.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets information about the current stack frame, listing specific return fields (function name, file location, line number, address). It distinguishes from siblings like gdb_get_backtrace (which gives entire stack) and gdb_select_frame (which changes the current frame).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises to use gdb_select_frame first to change the current frame if needed, and requires session_id from gdb_start_session. However, it does not explicitly rule out alternatives like gdb_get_backtrace for frame details, though the singular 'current frame' implies a single frame.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_get_registersA
Get CPU register values for the current frame. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. It only states the action without indicating that it is a read-only operation with no side effects. This is a notable gap for a tool that retrieves data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences, front-loading the purpose. Every word serves a function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema), the description covers the essential purpose and prerequisite. However, it lacks any indication of the return format or the number of registers, which could be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage, and the description adds no additional meaning beyond what the schema already provides. The schema already states session_id is an integer and required. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Get' and resource 'CPU register values for the current frame', clearly defining what the tool does. It distinguishes itself from sibling tools like gdb_get_variables (variables) and gdb_get_backtrace (backtrace).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions that a session_id is required and that it comes from gdb_start_session, providing a prerequisite. However, it does not provide explicit guidance on when to use this tool versus alternatives, nor does it state when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_get_statusB
Get the current status of the GDB session. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must fully disclose behavior. It only states the tool gets status but provides no details about side effects, blocking behavior, error handling, or what happens if the session is invalid. The lack of behavioral context leaves the agent uncertain about the operational semantics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences conveying the core purpose and a critical prerequisite. Every word serves a purpose, and no extraneous information is present. It is front-loaded with the action and follows with a necessary dependency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one required parameter, no output schema), the description covers the essential input requirement. However, it omits what the return value represents (e.g., status details, session state). For a tool that outputs data, this is a gap, but the minimal context is acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100% for the single parameter (session_id). The description echoes the schema's description, adding no new meaning. Since schema already explains the parameter, the description adds minimal value. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get the current status of the GDB session.' It uses a specific verb ('Get') and resource ('status of the GDB session'), distinguishing it from other GDB tools that manipulate breakpoints or execution. However, it does not elaborate on what 'status' entails, which could be improved.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions the prerequisite session_id and its source ('obtained from gdb_start_session'), providing some usage guidance. However, it does not offer explicit when-to-use or when-not-to-use instructions relative to sibling tools, nor does it clarify alternatives. This is adequate but not comprehensive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_get_threadsA
Get information about all threads in the debugged process, including thread IDs, states, and the current thread. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It implies a read-only operation by saying 'Get information', but it does not explicitly state that it is non-destructive or require any permissions. More explicit safety cues would improve transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of two short sentences that convey the purpose and prerequisite without any unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description adequately explains what the tool returns (thread IDs, states, current thread) and the required argument. Given the simple input and no output schema, the description is fairly complete. It could mention the read-only nature, but overall it provides enough context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers the single parameter with a description, and the tool description repeats that session_id comes from gdb_start_session. Since schema coverage is 100%, the baseline is 3, and the description adds no new semantic detail beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that it gets information about all threads, listing specific data like thread IDs, states, and the current thread. It distinguishes itself from sibling tools like gdb_select_thread or gdb_get_status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description specifies that the session_id parameter must be obtained from gdb_start_session, providing a clear prerequisite. However, it does not give guidance on when to use this tool versus alternatives like gdb_get_status, so the context is present but not exhaustive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_get_variablesB
Get local variables for a specific stack frame in a thread. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| thread_id | No | Thread ID (None for current) | |
| frame | No | Frame number (0 is current) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavior. It implies a read-only operation ("get") but does not explicitly state that no state is modified, nor does it mention potential error conditions (e.g., invalid session). For a simple getter, this is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with zero unnecessary words. The essential information is front-loaded: the action and the key prerequisite.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description explains the tool's purpose and a prerequisite, but lacks details about the return format (e.g., list of variable names/values) or error scenarios. Given no output schema, the agent may need more context to interpret results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with all parameters described. The description reinforces that session_id comes from gdb_start_session, but adds no new semantics for thread_id or frame beyond what the schema already provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb "Get" and resource "local variables" with context "for a specific stack frame in a thread", distinguishing it from sibling tools like gdb_get_backtrace (stack trace) and gdb_get_registers (registers). It is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions a prerequisite (session_id from gdb_start_session) but provides no guidance on when to use this tool versus alternatives, nor any exclusions or recommended context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_interruptA
Interrupt (pause) a running program. Use this when: 1) The program is running and hasn't hit a breakpoint, 2) You want to pause execution to inspect state or set breakpoints, 3) The program appears stuck or you want to see where it is. After interrupting, you can use other commands like gdb_get_backtrace, gdb_get_variables, or gdb_continue. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description explains that the tool pauses execution, but does not explicitly state if it is non-destructive or what state it leaves the program. With no annotations, this is a moderate disclosure of behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences cover purpose, usage scenarios, post-interrupt actions, and parameter source. Every sentence is valuable, no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple one-parameter tool and no output schema, the description covers usage context and post-interrupt actions adequately. Could mention potential side effects or state safely but overall sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Parameter schema provides 100% coverage with description 'Session ID from gdb_start_session'. The tool description adds value by linking to sibling tool output, exceeding baseline for full schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Interrupt (pause) a running program.' It uses a specific verb and resource, and it is distinct from sibling tools like gdb_continue and gdb_next.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit when-to-use scenarios (running, no breakpoint, stuck) and what to do after interrupting (use other GDB commands). It also notes the prerequisite session_id from gdb_start_session.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_list_breakpointsA
List all breakpoints as structured data with detailed information. Returns an array of breakpoint objects, each containing: number, type, enabled status, address, function name, source file, line number, and hit count. Use this to verify breakpoints were set correctly, check which have been hit (times field), and inspect their exact locations. Much easier to filter and analyze than text output. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It fully discloses the return format: an array of objects with fields like number, type, enabled status, address, etc. It notes it's structured data and easier to filter. It does not cover error cases, but for a read-only listing, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences: first states purpose, second lists return fields, third gives use cases and prerequisite. Every sentence adds value and is efficiently structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (list breakpoints, one parameter, no output schema), the description covers purpose, return values, usage scenarios, and how to obtain the required parameter. It is complete for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter (session_id) already described as 'Session ID from gdb_start_session'. The description repeats this, adding no new semantic information beyond what the schema provides. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('List all breakpoints') and resource ('breakpoints as structured data'). It distinguishes itself from sibling tools like gdb_set_breakpoint and gdb_delete_breakpoint by focusing on listing. The verb 'list' and resource 'breakpoints' are specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit use cases: 'verify breakpoints were set correctly, check which have been hit, and inspect their exact locations.' It also advises preferring this over text output for easier filtering. While it doesn't explicitly state when not to use, the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_nextA
Step over to the next line (doesn't enter function calls). IMPORTANT: Only works when program is PAUSED at a specific location. Use this to step over function calls without entering them. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| timeout_sec | No | Seconds to wait for the program to stop again |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the burden. It discloses that the tool steps over functions and requires a paused state. However, it does not mention potential side effects, timeout behavior, or what happens if the program is not paused. The timeout_sec parameter is in the schema but not described behaviorally.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences with no wasted words. The crucial condition is highlighted in all caps. Front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple step-over tool with no output schema, the description sufficiently covers the purpose, prerequisite, and usage condition. It could mention that the tool resumes execution and then pauses again, but this is implicitly understood.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds context that session_id comes from gdb_start_session, which is helpful but minimal beyond what the schema already says.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the action: 'Step over to the next line (doesn't enter function calls).' This clearly distinguishes it from gdb_step (which steps into functions), providing a specific verb and resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context: 'Only works when program is PAUSED at a specific location' and 'Requires session_id parameter (obtained from gdb_start_session).' It implicitly contrasts with stepping into functions, but does not explicitly name the alternative sibling (gdb_step).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_select_frameA
Select a specific stack frame to make it the current frame. Frame 0 is the innermost (current) frame, higher numbers are outer frames. After selecting a frame, commands like gdb_get_variables and gdb_evaluate_expression will operate in the context of that frame. Use gdb_get_backtrace to see available frames and their numbers. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| frame_number | Yes | Frame number (0 is current/innermost frame) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must convey behavioral traits. It discloses that selecting a frame changes the context for commands like gdb_get_variables and gdb_evaluate_expression. However, it does not mention error handling (e.g., invalid frame number) or side effects like modifying GDB state beyond context change.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with four sentences, each serving a clear purpose: stating the action, defining frame numbering, explaining the effect, and listing prerequisites. No redundant information, and key details are front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description covers the essential aspects: purpose, parameter semantics, usage context, and prerequisite. It could mention potential errors, but for a simple selection tool, the completeness is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by explaining the frame_number parameter in context (0=innermost) and specifying that session_id must come from gdb_start_session. This enhances understanding beyond the schema's brief descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool selects a specific stack frame to be the current frame, distinguishing it from sibling tools like gdb_get_frame_info and gdb_get_backtrace. It specifies the verb 'select' and the resource 'stack frame', with clear differentiation from listing or inspecting frames.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides usage guidance by explaining frame numbering (0 innermost), the effect on subsequent commands, and how to obtain frame numbers via gdb_get_backtrace. It also mentions the prerequisite session_id. However, it does not explicitly state when not to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_select_threadA
Select a specific thread to make it the current thread. After selecting a thread, subsequent commands like gdb_get_backtrace, gdb_get_variables, and gdb_evaluate_expression will operate on this thread. Use gdb_get_threads to see available thread IDs. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| thread_id | Yes | Thread ID to select |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description effectively conveys that selecting a thread affects later commands. It mentions the session_id requirement from gdb_start_session. No contradictions or missing critical behaviors.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary action, and every sentence adds essential information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description fully explains the tool's purpose, prerequisites, and effect on subsequent commands. For a simple selection tool with no output schema, it is complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds value by linking session_id to gdb_start_session and thread_id to gdb_get_threads, providing context beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action 'select a specific thread' and the resource 'thread'. It is distinct from sibling tools like gdb_select_frame and gdb_get_threads.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use the tool (to change context for subsequent commands) and refers to gdb_get_threads for thread IDs. It does not explicitly say when not to use it, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_set_breakpointA
Set a breakpoint at a function, file:line, or address. Supports conditional breakpoints and temporary breakpoints. Supports hardware-assisted breakpoints with hardware=true. Returns breakpoint details including number, address, and location. Use gdb_list_breakpoints to verify breakpoints were set correctly. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| location | Yes | Breakpoint location (function, file:line, or *address) | |
| condition | No | Conditional expression | |
| temporary | No | Whether breakpoint is temporary | |
| hardware | No | Whether to use a hardware-assisted breakpoint |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It mentions return details and covers core behavior but does not discuss error conditions, side effects, or permission needs. It adds some context beyond annotations but is not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with no wasted words, front-loaded with the main action, and structured logically. Each sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters and no output schema or annotations, the description covers the main purpose, return values, and usage guidance. It is reasonably complete for typical use, though lacks error handling details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds meaning beyond the schema: it explains location types ('function, file:line, or address') and highlights the hardware parameter. This provides operational context not present in schema descriptions alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'set' and the resource 'breakpoint', specifying three location types: function, file:line, or address. It also mentions conditional, temporary, and hardware-assisted breakpoints, distinguishing it from sibling tools that delete, disable, enable, or list breakpoints.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description advises using gdb_list_breakpoints to verify and requires session_id from gdb_start_session, providing clear context on prerequisites and verification. However, it does not explicitly mention when not to use or alternatives, but the purpose is specific enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_start_sessionA
Start a new GDB debugging session. Can load an executable, core dump, or run custom initialization commands. Automatically detects and reports important warnings such as: missing debug symbols (not compiled with -g), file not found, or invalid executable. Check the 'warnings' field in the response for critical issues that may affect debugging. Available parameters: program (executable path), args (program arguments), core (core dump path - uses --core flag for proper symbol resolution), init_commands (GDB commands to run after loading), env (environment variables), gdb_path (GDB binary path), working_dir (directory to run program from). IMPORTANT for core dump debugging: Set 'sysroot' and 'solib-search-path' AFTER loading the core (either via 'core' parameter or 'core-file' init_command) for symbols to resolve correctly. Returns a session_id integer that must be passed to all other GDB tools.
| Name | Required | Description | Default |
|---|---|---|---|
| program | No | Path to executable to debug | |
| args | No | Command-line arguments for the program | |
| init_commands | No | GDB commands to run on startup (e.g., 'core-file /path/to/core', 'set sysroot /path') | |
| env | No | Environment variables to set for the debugged program (e.g., {'LD_LIBRARY_PATH': '/custom/libs'}) | |
| gdb_path | No | Path to GDB executable (default: from GDB_PATH env var or 'gdb') | |
| working_dir | No | Working directory to use when starting GDB. Use this when debugging programs that need to be run from a specific directory, or when the program expects to find files (config, data, etc.) relative to its working directory. GDB will be started in this directory, then the original directory is restored. Example: If debugging a server that loads config from './config.json', set working_dir to the server's directory. | |
| core | No | Path to core dump file for post-mortem debugging. When specified, GDB is started with --core flag which properly initializes symbol resolution. IMPORTANT: When using a sysroot with core dumps, set sysroot AFTER the core is loaded (either via this parameter or core-file command) for symbols to resolve correctly. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries the burden. It discloses that warnings are reported in a 'warnings' field, that a session_id is returned and must be used with other tools, and explains the required sequence for core dump symbol resolution (sysroot after core load). This is comprehensive behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is somewhat lengthy and mixes parameter listing with usage notes. It could be more structured, perhaps by separating parameter details from procedural notes. While every sentence adds value, the overall flow could be tighter. There is some redundancy with the schema descriptions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of the tool (7 parameters, no output schema, important behavioral nuances), the description covers all necessary aspects: what the tool does, how to use parameters, key warnings, the returned session_id, and critical ordering for core dump debugging. It is complete and effectively supports an AI agent in correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds significant value beyond the schema. For example, it explains the --core flag for core dumps and the important ordering for symbol resolution, provides examples for init_commands and working_dir, and clarifies the use of env. This extra context is highly beneficial for correct usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it starts a new GDB debugging session and lists the actions it can perform (load executable, core dump, init commands). It differentiates from sibling tools (e.g., gdb_set_breakpoint, gdb_continue) by focusing on session initialization. The purpose is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear guidance on when to use the tool (starting a session) and gives important usage notes, especially for core dump debugging with sysroot. It does not explicitly state when not to use or list alternatives, but the context of sibling tools and the session-oriented nature mitigates this. The warnings about critical issues in the response add value.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_stepA
Step into the next instruction (enters function calls). IMPORTANT: Only works when program is PAUSED at a specific location. Use this for single-stepping through code to debug line-by-line. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session | |
| timeout_sec | No | Seconds to wait for the program to stop again |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses the stepping behavior (enters functions) and the prerequisite (paused state). Does not mention side effects or limits, but given the simple nature of stepping, it is transparent enough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with front-loaded main action and important note in all caps. No redundant words. Every sentence is necessary and concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking output schema, the description sufficiently explains the tool's purpose, prerequisites, and required parameter. Could mention behavior if not paused or timeout implications, but adequate for a straightforward stepping tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers 100% of parameters. Description adds value by linking session_id to gdb_start_session but does not elaborate on timeout_sec. Baseline 3 is appropriate as schema already documents both parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Step into the next instruction (enters function calls),' which is a specific verb and resource. It distinguishes from sibling tools like gdb_next (step over) and gdb_continue (resume freely).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states 'Only works when program is PAUSED at a specific location' and 'Use this for single-stepping...' Provides clear context but lacks explicit alternatives or when-not conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_stop_sessionA
Stop the current GDB session and clean up resources. Requires session_id parameter (obtained from gdb_start_session).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavioral traits. It mentions 'clean up resources,' implying side effects, but does not detail irreversibility, permissions, or what happens to ongoing debugging.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that conveys all necessary information without wordiness. It is front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple termination tool with one parameter and no output schema, the description is mostly complete. It could mention return values or error conditions, but the core functionality is clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes the session_id parameter with 100% coverage. The description only adds that it is obtained from gdb_start_session, which adds marginal value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Stop the current GDB session and clean up resources,' which is a specific verb+resource combination. It is easily distinguished from sibling tools like gdb_interrupt or gdb_continue.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly mentions the prerequisite session_id from gdb_start_session, indicating when this tool should be used. However, it does not explicitly list alternatives or contexts where it should not be used.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct purpose: session management, breakpoint operations, execution control, state inspection, and selection. There is no overlap; even stepping and continuing are clearly differentiated.
All tool names follow the consistent pattern gdb_<verb> or gdb_<verb>_<noun> (e.g., gdb_set_breakpoint, gdb_get_backtrace). The prefix and naming style are uniform.
22 tools cover the essential GDB debugging workflow without being excessive. Each tool serves a necessary function, and the count is well-scoped for a debugger server.
The tool surface covers the full debugging lifecycle: session start/stop, breakpoint management, execution control, thread/stack inspection, variable/register access, and expression evaluation. Any missing features can be accessed via gdb_execute_command, making the set comprehensive.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Live browser debugging for AI assistants — DOM, console, network via MCP.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides programmatic access to the GNU Debugger (GDB), enabling AI models to interact with GDB through natural language for debugging tasks.9Apache 2.0
- AlicenseAqualityCmaintenanceMCP server that exposes GDB debugging as tools. An AI assistant can set breakpoints, run programs, step through code, inspect variables and memory, and examine registers — all via structured tool calls. Reverse debugging with rr is also supported.343MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to control GDB debugger via MCP protocol for local and remote debugging, supporting CTF Pwn, crash analysis, and ELF inspection.131MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that exposes LLDB debugging capabilities, enabling AI-assisted interactive debugging of C/C++ applications through 40 specialized tools.4MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/airfloats/gdb_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server