gdb-mcp
gdb-mcp
gdb-mcp 是一个基于 MCP(Model Context Protocol) 的高权限 GDB 调试服务端,使用 pygdbmi 驱动本地 GDB,并将常见调试动作封装成结构化工具,适用于:
本地授权调试
CTF / Pwn 分析
Core Dump 分析
ELF 信息提取
远程
gdbserver调试崩溃现场排查
会话快照与自动化调试
项目当前面向 Python 3.12+。
1. 设计目标
这个项目的目标不是替代 GDB,而是提供一个适合模型和自动化系统调用的、有风险分级、可结构化返回、可远程调试、可渐进扩展 的 GDB 控制层。
核心特性:
基于 MCP 暴露调试工具
统一 JSON 返回格式
对高风险操作进行确认门控
支持本地与远程
gdbserver支持只读模式
支持块级内存写入
支持会话快照与能力查询
支持原始 GDB CLI / MI 命令
支持崩溃分析、ELF 检查和 pwndbg 兼容命令
Related MCP server: pwndbg-lldb-mcp
2. 当前项目结构
server.py # MCP 聚合入口
server_runtime.py # 共享运行时、控制器、公共 helper
tools_session.py # 会话与加载工具
tools_memory.py # 内存相关工具
tools_meta.py # 快照与能力工具
tools_remote.py # 远程调试与上下文工具
tools_control.py # 寄存器、断点、运行控制工具
tools_advanced.py # 原始命令、分析、ELF、插件兼容工具
gdb_controller.py # GDB/MI 控制器
safety.py # 风险评估规则
models.py # 统一响应模型
config.py # 环境变量配置
utils.py # 解析与辅助函数
tests/ # unittest + smoke test
examples/ # 示例程序3. 安装
3.1 克隆仓库
git clone <repo-url>
cd gdb-mcp3.2 创建虚拟环境并安装
Windows PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .如果你要运行测试:
pip install -e .[dev]3.3 安装 GDB
确保本机可执行:
gdb --versionWindows 下常见方案是使用 MSYS2:
pacman -Syu
pacman -S gdb gdb-multiarch然后把 GDB 所在目录加入 PATH。
4. 启动方式
4.1 直接启动 MCP 服务
python server.py或通过安装后的脚本:
gdb-mcp4.2 在 MCP 客户端中配置
示例:
[mcp_servers.gdb-mcp]
command = "D:\\gdb-mcp\\.venv\\Scripts\\python.exe"
args = ["D:\\gdb-mcp\\server.py"]只要客户端支持 stdio MCP server,就可以用相同方式接入。
5. 环境变量配置
所有配置项都可以通过 GDB_MCP_ 前缀环境变量覆盖。
常用配置
变量 | 说明 | 默认值 |
| GDB 可执行路径 |
|
| 默认命令超时 |
|
| 远程调试超时 |
|
| 单次最大内存读取阈值 |
|
| 单次最大内存写入阈值 |
|
| 免确认 dump 阈值 |
|
| 最大步进数量 |
|
| 是否启用远程调试 |
|
| 是否启用原始 GDB CLI |
|
| 是否启用原始 GDB/MI |
|
| 是否启用 pwndbg/gef/peda 兼容命令 |
|
| 是否启用只读模式 |
|
| 字节写入回退时的分块粒度 |
|
| 默认远程模式 |
|
只读模式
开启后,会阻止有状态修改类操作,例如:
gdb_memory(action="write")gdb_memory(action="write_block")gdb_register(action="write")gdb_breakpoint(action="add")gdb_run_control(action="run")
示例:
$env:GDB_MCP_READ_ONLY_MODE = "true"
python server.py6. 统一返回格式
所有工具都返回统一 JSON:
{
"ok": true,
"tool": "gdb_memory",
"action": "read",
"risk_level": "low",
"need_confirm": false,
"executed_with_risk": false,
"warning": null,
"data": {},
"stdout": "",
"stderr": "",
"raw": {},
"error": null
}字段说明:
ok:工具是否成功tool:工具名action:子动作名risk_level:风险级别need_confirm:是否需要再次以confirm=true执行executed_with_risk:是否在确认后执行了风险操作warning:风险说明data:结构化结果stdout/stderr:底层 GDB 输出raw:原始记录error:错误描述
7. 当前全部可用工具
7.1 会话与加载
gdb_session
用于管理 GDB 会话:
startstoprestartstatus
gdb_session(action="start")
gdb_session(action="status")gdb_load
加载本地二进制、core 文件、符号文件和参数。
gdb_load(binary="E:/ctf/pwn/pwn", args=["a", "b"])7.2 内存工具
gdb_memory(action="read")
gdb_memory(action="read", address="$rsp", size=128)gdb_memory(action="write")
gdb_memory(action="write", address="0x404000", data_hex="41424344", confirm=True)gdb_memory(action="write_block")
块级写入,优先走 restore ... binary:
gdb_memory(action="write_block", address="0x404000", data_hex="414243444546", confirm=True)返回中会附带:
write_modeexecuted_commandbyte_countpartial_write_possible
gdb_memory(action="search")
gdb_memory(action="search", address="$rsp", size=256, pattern="41414141")gdb_memory(action="dump")
gdb_memory(action="dump", address="0x404000", size=512, confirm=True)7.3 元工具
gdb_snapshot
支持:
showsavelistrestore
gdb_snapshot(action="save", name="crash_case_1")
gdb_snapshot(action="list")
gdb_snapshot(action="restore", name="crash_case_1")当前行为:
将快照保存到工作目录下的
.gdb-mcp-snapshots/保存当前 binary / core / symbol_file / 远程状态 / 最近命令 / inferior 状态
恢复时会优先尝试重新加载 binary、sysroot、solib 路径和远程配置,再回填缓存状态
恢复结果里会返回
restore.operations,展示每个阶段是否执行成功可用于判断当前是“完全恢复”“部分恢复”还是“仅缓存恢复”
gdb_capabilities
gdb_capabilities()返回内容包括:
原始 GDB CLI 是否启用
原始 GDB/MI 是否启用
pwndbg 命令是否启用
远程调试是否启用
是否只读模式
7.4 远程调试与上下文
gdb_remote
支持:
statusconnectdisconnectreconnectsetupset_sysrootset_solib_search_pathset_remote_exec_fileset_debug_file_directory
远程连接示例:
gdb_remote(
action="connect",
host="192.168.56.101",
port=1234,
mode="remote",
local_binary="E:/ctf/pwn/pwn",
confirm=True
)扩展远程示例:
gdb_remote(
action="connect",
host="192.168.56.101",
port=1234,
mode="extended-remote",
local_binary="E:/ctf/pwn/pwn",
remote_binary="/home/user/pwn",
confirm=True
)gdb_context
返回:
寄存器
当前指令
附近反汇编
栈内容
backtrace
breakpoints
mappings
shared libraries
线程与 frame 信息
函数参数推断
gdb_context(depth=20)7.5 寄存器、断点、执行控制
gdb_register
支持:
read_allreadwrite
gdb_register(action="read", name="rip")
gdb_register(action="write", name="rip", value="0x401000", confirm=True)gdb_breakpoint
支持:
listadddeleteenabledisableconditionclearwatchrwatchawatch
gdb_breakpoint(action="add", location="main")
gdb_breakpoint(action="list")gdb_run_control
支持:
runcontinuestepnextstepinextifinishuntilinterruptkillrestart
gdb_run_control(action="continue")
gdb_run_control(action="step", count=3)7.6 原始命令、分析、ELF、插件兼容
gdb_exec
执行原始 GDB CLI 命令:
gdb_exec(command="info registers")
gdb_exec(command="x/10i $rip")gdb_mi
执行原始 GDB/MI 命令:
gdb_mi(mi_command="-thread-info")gdb_analyze
做崩溃和可利用性线索分析:
gdb_analyze(mode="crash")当前会输出:
signal 推断
fault address
PC 是否疑似可控
栈中是否出现明显填充值
backtrace 摘要
参数寄存器摘要
possible causes
exploitation_hints.leak_hintsexploitation_hints.rop_gadget_hintsexploitation_hints.libc_base_guessexploitation_hints.leak_chain_suggestionsexploitation_hints.strategy_hints
这部分结果现在会尝试给出:
栈上疑似 libc / PIE 地址
当前窗口中的 gadget 分类线索,如
ret、pop_rdi、syscall基于泄露地址的 libc 基址粗略猜测
常见泄露链和 ret2libc/ROP 方向提示
基于崩溃类型的简单利用路径建议
gdb_elf
支持:
checksecinfoentrysectionssegmentssymbolsrelocationsdynamicgotpltstringsropleaks
gdb_elf(action="checksec", path="E:/ctf/pwn/pwn")
gdb_elf(action="rop", path="E:/ctf/pwn/pwn")
gdb_elf(action="leaks", path="E:/ctf/pwn/pwn")新增辅助内容:
rop:从反汇编结果里提取 gadget,并附带categorygot/plt:附带结构化条目解析leaks:返回常见 libc / 输出函数候选,以及常见泄露链建议更适合与
checksec、gdb_analyze联动使用
8. 典型使用流程
本地调试
gdb_session(action="start")
gdb_load(binary="E:/ctf/pwn/pwn")
gdb_breakpoint(action="add", location="main")
gdb_run_control(action="run")
gdb_context(depth=20)远程 gdbserver 调试
gdb_session(action="start")
gdb_remote(
action="connect",
host="192.168.56.101",
port=1234,
mode="remote",
local_binary="E:/ctf/pwn/pwn",
confirm=True
)
gdb_breakpoint(action="add", location="main")
gdb_run_control(action="continue")
gdb_context(depth=20)打补丁
gdb_memory(action="write_block", address="0x404000", data_hex="90909090", confirm=True)崩溃分析
gdb_context(depth=32)
gdb_analyze(mode="crash")
gdb_elf(action="checksec")9. 远程调试典型架构
MCP Client
-> gdb-mcp
-> local GDB
-> target remote / extended-remote
-> remote gdbserver
-> target processLinux 目标机安装:
sudo apt update
sudo apt install -y gdbserver gdb gcc make binutils file启动:
gdbserver 0.0.0.0:1234 ./pwnWindows 侧检查连通性:
Test-NetConnection 192.168.56.101 -Port 123410. 风险控制模型
项目不是“一刀切禁止高危命令”,而是使用 风险分级 + 二次确认:
low:直接执行medium/high/critical:第一次返回警告再次调用时传
confirm=true才会执行
典型受控动作:
target remoteshellpython内存写入
dump memory
寄存器写入
kill / restart
11. 测试与验证
11.1 smoke test
python tests/smoke_test.py11.2 单元测试
python -m unittest tests.test_utils tests.test_gdb_controller tests.test_server_helpers tests.test_meta_tools tests.test_remote_tools tests.test_control_tools tests.test_advanced_tools11.3 语法检查
python -m compileall server.py server_runtime.py tools_session.py tools_memory.py tools_meta.py tools_remote.py tools_control.py tools_advanced.py gdb_controller.py utils.py tests12. 已知限制
write_block目前要求数值地址,不支持复杂 GDB 表达式地址。块级写入依赖本地临时二进制文件与 GDB
restore命令。某些远程场景下
info proc mappings可能不可用,这会体现在结构化结果里,而不是导致整个工具失败。gdb_analyze目前是启发式分析,不是严格 exploitability engine。gdb_pwndbg是否真正可用,取决于本机 GDB 环境是否已安装相应插件。
13. 许可证
MIT
Available Tools
13 toolsgdb_analyzeC
Analyze crash state, registers, stack, exploitability, calling convention, or memory faults.
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | crash |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It only lists what it analyzes but fails to disclose side effects, prerequisites (e.g., a running process), or whether analysis is read-only.
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 concise sentence. While it could be restructured to include more detail, it is not verbose or wasteful.
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 complexity (multi-mode analysis), the description is incomplete. It lacks details on input semantics, output schema hints, and usage context relative to siblings. The presence of an output schema is not leveraged.
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 one parameter 'mode' with 0% description coverage. The tool description does not explain what values mode accepts, leaving the agent to guess. The listed resources might correspond to mode values, but this is implicit and insufficient.
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 a specific verb 'Analyze' and lists multiple analysis resources (crash state, registers, stack, etc.), making the purpose clear. However, it does not distinguish from sibling tools like gdb_register or gdb_memory, which focus on individual aspects.
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 is provided on when to use this tool versus alternatives. It does not mention that the mode parameter selects the analysis type or that siblings exist for specific tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_breakpointC
Add, delete, enable, disable, list, condition, or clear breakpoints/watchpoints.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| location | No | ||
| number | No | ||
| condition | No | ||
| temporary | No | ||
| hardware | No | ||
| watch_expr | No | ||
| confirm | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose behavioral traits. It only lists actions without explaining side effects, required states (e.g., running GDB), or failure modes. For example, it doesn't clarify what 'list' returns or whether 'delete' requires a number.
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 at one sentence but is a flat list of verbs. It lacks structure to separate different action groups or link to parameters, making it less effective despite brevity.
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 tool has 8 parameters and supports multiple actions, but the description offers no details on how parameters relate to actions, return values (though output schema exists), or usage examples. This is incomplete 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?
Schema description coverage is 0%, and the description does not explain any of the 8 parameters (action, location, number, condition, temporary, hardware, watch_expr, confirm). It provides no semantic help beyond the terms in 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 lists multiple specific actions (add, delete, enable, disable, list, condition, clear) targeting breakpoints/watchpoints, making the tool's purpose clear. However, it does not differentiate these sub-operations or distinguish the tool from siblings like gdb_run_control or gdb_memory.
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 is provided on when to use this tool versus alternatives (e.g., gdb_run_control for execution, gdb_memory for memory). There are no exclusions or context about prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_contextB
Return registers, current instruction, disassembly, stack, backtrace, breakpoints, and mappings.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries full burden. It states 'Return' indicating a read operation, but does not disclose any side effects, required program state (e.g., must be paused), performance implications, or whether the function alters state.
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 front-loads the action ('Return') and lists the returned items efficiently. However, it omits parameter details, keeping it concise but slightly incomplete.
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 presence of an output schema (context indicates 'has output schema: true'), the description does not need to detail return values but should explain the depth parameter. It lists the returned items but misses parameter semantics, making it adequate but not 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?
The input schema has one parameter 'depth' with a default of 20, but the description fails to explain its meaning or effect. With schema description coverage at 0%, the description should compensate but does not.
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 specifies a clear verb 'Return' and lists multiple specific resources (registers, instruction, disassembly, etc.). This distinguishes it from siblings like gdb_register or gdb_memory which return single aspects.
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 implies use for getting a comprehensive debug context snapshot but provides no explicit guidance on when to choose this over sibling tools like gdb_register or gdb_memory. No alternatives or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_elfB
Inspect ELF metadata using pyelftools when available and readelf/objdump as fallback.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| path | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the fallback mechanism (pyelftools first, then readelf/objdump), which is behavioral information beyond the absent annotations. This helps the agent understand potential differences in output.
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, front-loaded with purpose, but omits essential parameter information. It is concise but incomplete.
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 having an output schema, the description lacks critical details about acceptable actions and path usage, making it insufficient for 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?
With 0% schema description coverage and no parameter details in the description, the agent cannot infer valid values for 'action' or the role of 'path'. The description adds no parameter-level meaning.
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 states the tool inspects ELF metadata and specifies the backends (pyelftools, readelf/objdump), giving a clear verb and resource. However, it does not differentiate from siblings like gdb_analyze explicitly.
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 is provided on when to use this tool versus alternatives. The agent receives no context for selection among sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_execC
Execute an arbitrary GDB CLI command with warning-and-confirm risk handling.
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| confirm | No | ||
| timeout | No | ||
| parse | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Lacks annotations. Only mentions 'warning-and-confirm' but not specifics like potential consequences, required permissions, or error handling for dangerous commands.
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?
A single sentence is concise but too sparse; could include structured parameter mention without being lengthy.
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 having an output schema, the description fails to explain parameter behavior, risk scenarios, or return format. Inadequate for a complex arbitrary execution 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?
0% schema description coverage. The description adds no meaning to parameters (command, confirm, timeout, parse). 'Warning-and-confirm' vaguely hints at confirm but is not explicit.
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 verb 'execute' and resource 'arbitrary GDB CLI command'. Distinguishes from specialized siblings like gdb_breakpoint or gdb_memory.
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 explicit guidance on when to use this tool vs alternative GDB tools. The risk handling hint is insufficient for decision making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_loadC
Load a binary, core file, symbol file, and optional program arguments.
| Name | Required | Description | Default |
|---|---|---|---|
| binary | No | ||
| core | No | ||
| symbol_file | No | ||
| args | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears full responsibility for disclosing behavioral traits. It fails to mention whether the operation is destructive, requires a running session, or produces any side effects, leaving the agent without critical safety information.
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, extremely concise. However, it may be too brief, omitting necessary details for a tool with multiple parameters. While front-loaded with the verb and resources, it sacrifices completeness for brevity.
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 complexity (loading multiple artifacts) and lack of annotations, the description is severely incomplete. It does not mention return values (despite an existing output schema), prerequisites, or the effect on the debugging session. The agent lacks essential context to use the tool 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 0%, so the description must compensate. It merely lists parameter names ('binary', 'core', 'symbol_file', 'args') without explaining their roles or expected formats, adding minimal value beyond the schema's title fields. For example, it doesn't clarify that 'binary' is the path to the executable or that 'args' are command-line arguments.
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 'Load' and lists the specific resources: binary, core file, symbol file, and optional program arguments. This clearly distinguishes it from sibling tools like gdb_memory or gdb_register which focus on different aspects of GDB debugging.
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 no guidance on when to use this tool versus alternatives such as gdb_remote for remote debugging or gdb_exec for execution. It lacks any context about prerequisites or scenarios where loading is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_memoryC
Read, write, search, or dump inferior memory.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| address | No | ||
| size | No | ||
| data_hex | No | ||
| pattern | No | ||
| output_file | No | ||
| confirm | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, and the description fails to disclose behavioral traits such as side effects of write operations, safety considerations, or that the 'confirm' parameter may require user acknowledgment. The description lists actions but provides no behavioral context.
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 efficient sentence, but it may be too terse given the complexity of the tool. However, it earns points for being front-loaded with the core 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?
Despite having an output schema, the tool has 7 parameters and a rich set of actions with no parameter documentation. The description is insufficient for an agent to correctly invoke all variations of the 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 description coverage is 0%, yet the description adds no detail about parameters. For example, the required 'action' parameter has no listed valid values, and parameters like 'address' and 'data_hex' remain unexplained, forcing the agent to guess.
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 four distinct actions (read, write, search, dump) on a specific resource (inferior memory), making the tool's purpose very clear and differentiating it from sibling tools like gdb_register or gdb_context.
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 is provided on when to use this tool versus alternatives, nor are there any prerequisites or context for selecting specific actions. The agent must infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_miC
Execute a raw GDB/MI command with warning-and-confirm risk handling.
| Name | Required | Description | Default |
|---|---|---|---|
| mi_command | Yes | ||
| confirm | No | ||
| timeout | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only says 'with warning-and-confirm risk handling' without explaining what that entails (e.g., destructive behavior, suppression of warnings). Leaves ambiguity about the tool's operational traits.
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, which is concise, but it sacrifices completeness. It earns its place but lacks critical detail, so it's not optimally 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?
With no annotations and an incomplete description, the tool is poorly documented. Does not mention output schema, return values, error handling, or how timeout/confirm function. Insufficient for safe or 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 description coverage is 0%; description does not explain any parameter's meaning or usage. The parameters (mi_command, confirm, timeout) are left completely undefined beyond their types and defaults.
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?
Description clearly states it executes raw GDB/MI commands, distinguishing it from sibling tools that are more specific (e.g., gdb_breakpoint, gdb_exec). The verb 'execute' and resource 'GDB/MI command' are specific.
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 explicit guidance on when to use this tool vs alternatives. Mentions 'warning-and-confirm risk handling' but does not explain when to set confirm=true or prefer other tools for common operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_pwndbgC
Execute pwndbg/gef/peda helper commands if they appear available.
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| confirm | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so description must cover behavioral traits. It only mentions executing commands 'if they appear available', with no details on side effects, errors, or permissions.
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?
Single sentence is concise but lacks structure and essential detail. Under-specification does not earn 'conciseness' credit.
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?
With many sibling GDB tools and an output schema, the description fails to explain when pwndbg commands are appropriate or what the output contains. Incomplete for decision-making.
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 0% and description provides no information about the 'command' or 'confirm' parameters. Agent has no guidance on valid commands or usage of confirm flag.
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?
Description specifies verb 'Execute' and resource 'pwndbg/gef/peda helper commands', which clearly identifies the tool's domain. However, 'if they appear available' adds uncertainty, and it doesn't differentiate from sibling tools like gdb_analyze.
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 vs alternatives. Does not specify prerequisites or context for executing helper commands.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_registerC
Read all registers, read one register, or write one register.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| name | No | ||
| value | No | ||
| confirm | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description must disclose behavioral traits. It only lists the three operations but does not mention side effects of writing, required permissions, or whether reading returns a specific format. The 'confirm' parameter hints at a confirmation step but is not explained.
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 a single sentence front-loading the operations. However, it is overly brief at the expense of necessary details, making it less 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 complexity (4 parameters, no schema descriptions, three distinct actions), the description is severely incomplete. It does not describe how to specify which register, how to confirm writes, or what the output schema returns.
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?
With 0% schema description coverage, the description must compensate but fails. It does not map the three operations to the parameters (action, name, value, confirm). The 'action' parameter's allowed values are not listed, and 'name', 'value', 'confirm' are left undefined.
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 three specific operations: reading all registers, reading one register, or writing one register. It uses a specific verb (read/write) and resource (register), making the purpose 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?
No guidance is provided on when to use this tool versus alternatives like gdb_memory or gdb_breakpoint. The description does not mention prerequisites or context for each mode.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_remoteC
Configure or connect Windows GDB to a VM-side gdbserver.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| host | No | ||
| port | No | ||
| mode | No | remote | |
| local_binary | No | ||
| remote_binary | No | ||
| sysroot | No | ||
| solib_search_path | No | ||
| debug_file_directory | No | ||
| architecture | No | ||
| confirm | No | ||
| timeout | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry full behavioral disclosure. It does not mention side effects (e.g., whether a connection is persistent), error handling, authentication needs, or rate limits. For a tool that connects to a remote server, these details are critical. The description is too sparse.
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, highly concise with no wasted words. It gets straight to the point. However, conciseness is not an excuse for missing content, but in terms of structure, it is optimal.
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 has 12 parameters and an output schema, the description is severely underdeveloped. It does not explain return values, connection lifecycle, or how parameters interact. For a complex debugging tool, this is inadequate. No information about the output is provided, despite an output schema existing.
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?
With 0% schema description coverage, the description must explain parameter meanings. It does not. The description only says 'configure or connect,' leaving 12 parameters (action, host, port, mode, etc.) completely unexplained. No value is added beyond the schema itself.
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: 'Configure or connect Windows GDB to a VM-side gdbserver.' It uses a specific verb ('configure or connect') and resource ('Windows GDB to a VM-side gdbserver'), making the core function understandable. However, it does not distinguish this tool from sibling tools like gdb_session or gdb_mi, which might handle similar connection or debugging tasks.
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 no guidance on when to use this tool versus alternatives. Among the sibling tools (e.g., gdb_session, gdb_mi, gdb_breakpoint), there is no indication of when gdb_remote is appropriate, such as for initial setup versus ongoing debugging. No context about prerequisites or workflow is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_run_controlC
Run, continue, step, next, instruction-step, finish, until, interrupt, kill, or restart.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| count | No | ||
| args | No | ||
| stdin | No | ||
| timeout | No | ||
| confirm | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description must fully disclose behaviors. It lists actions but does not describe side effects (e.g., 'kill' terminates the program, 'interrupt' pauses). No mention of safety, state changes, or required 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 a single line listing actions, which is concise but lacks structure. It could be organized into categories or bullet points for clarity.
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 complexity (multiple actions, 6 parameters, no annotations), the description is insufficient. It does not explain return values (though output schema exists), prerequisites, or typical use cases. An agent would need significant additional inference.
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 has 6 parameters with 0% description coverage, and the description adds no parameter explanations. For example, 'action' is required but not elaborated; 'count', 'args', 'stdin', 'timeout', 'confirm' have defaults but no meaning. The description fails to compensate for the missing schema documentation.
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 lists multiple actions (Run, continue, step, next, etc.) that clearly indicate it controls GDB execution flow. It distinguishes from sibling tools like breakpoints or memory inspection. However, it does not explicitly state the resource (e.g., 'debugged program'), making it slightly less specific.
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 or which action to choose for a given scenario. The description lacks usage context, prerequisites, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gdb_sessionC
Start, stop, restart, or inspect the current GDB session.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| gdb_path | No | ||
| workdir | No | ||
| extra_args | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits but only lists actions without explaining their effects (e.g., whether starting clears state, what 'inspect' returns, or if restart requires an active session).
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 very concise with a single list of actions. It is front-loaded but lacks any structure like parameter mapping or usage hints; still, it is not verbose.
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 manages a GDB session with 4 parameters, an output schema, and no annotations, the description is incomplete. It omits action enum values, default workflow, and parameter roles, making it insufficient for 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 description coverage is 0%, yet the description adds no parameter details. It does not explain the 'action' values, the purpose of 'gdb_path', 'workdir', or 'extra_args', leaving the schema to carry full burden.
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 tool manages a GDB session with specific verbs: start, stop, restart, inspect. This clearly identifies the resource and actions, and distinguishes from sibling tools like gdb_breakpoint or gdb_memory.
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 is provided on when to use this tool versus alternatives like gdb_run_control or gdb_load. There are no prerequisites, side effects, or conditional usage tips.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
13 tool updates
v0.1.0- First observed
gdb_analyze - First observed
gdb_breakpoint - First observed
gdb_context - First observed
gdb_elf - First observed
gdb_exec - First observed
gdb_load - First observed
gdb_memory - First observed
gdb_mi - First observed
gdb_pwndbg - First observed
gdb_register - First observed
gdb_remote - First observed
gdb_run_control - First observed
gdb_session
TDQS
Scored across 13 tools
Tools mostly cover distinct GDB aspects (breakpoints, memory, registers, execution control, session), with minor overlap between 'gdb_context' and 'gdb_register' for register info, and 'gdb_exec' vs 'gdb_mi' for command execution.
All tools start with 'gdb_', but naming patterns vary: some are verbs (analyze, exec), some nouns (breakpoint, context), and one is verb_noun (run_control). No consistent verb_noun pattern.
13 tools is well-scoped for a GDB debugger server, covering essential operations without being overwhelming.
Covers most key GDB features (session, loading, breakpoints, execution, memory, registers, analysis, context, remote, plugins), though source-level debugging or variable inspection are missing but can be handled via gdb_exec.
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
1Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Related MCP Servers
- 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
- AlicenseCqualityDmaintenanceAn MCP server that exposes pwndbg commands running under LLDB as tools for AI assistants. This enables AI-driven binary analysis, exploit development, and reverse engineering through pwndbg's enhanced debugging capabilities.1001MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to control GDB debugging sessions, including breakpoint management, thread analysis, and variable inspection, using the GDB/MI protocol.221MIT
- FlicenseNot gradedqualityDmaintenanceEnables dynamic debugging with GDB via the MCP protocol, allowing LLMs to execute GDB commands, manage breakpoints, control execution, and inspect program state.4-