Skip to main content
Glama

debug

Launch and control debug sessions for any language using Debug Adapter Protocol. Set breakpoints, step through code, inspect variables, evaluate expressions, and manage stack traces.

Instructions

Interactive debugger using Debug Adapter Protocol (DAP). Launch and control debug sessions for any language with a DAP-compatible adapter. Supports breakpoints, stepping, variable inspection, expression evaluation, stack traces. Adapters: dlv (Go), debugpy (Python), codelldb/lldb-dap (C/C++/Rust), and more. Operations: launch, attach, set_breakpoints, continue, next, step_in, step_out, pause, threads, stack_trace, scopes, variables, evaluate, disconnect, status. Extended: breakpoint_locations, set_function_breakpoints, set_exception_breakpoints, set_data_breakpoints, data_breakpoint_info, set_instruction_breakpoints, disassemble, read_memory, write_memory, set_variable, set_expression, goto, goto_targets, step_back, reverse_continue, restart_frame, modules, loaded_sources, exception_info, completions, source, terminate, restart, cancel, step_in_targets, terminate_threads, resolve_address. Requires a DAP adapter executable installed on the system (e.g. 'dlv dap' for Go, 'python -m debugpy' for Python).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNoDebug session ID. Auto-generated if empty on launch
operationYesDebug operation: launch, attach, set_breakpoints, continue, next, step_in, step_out, pause, threads, stack_trace, scopes, variables, evaluate, disconnect, status, set_function_breakpoints, set_exception_breakpoints, set_data_breakpoints, data_breakpoint_info, set_instruction_breakpoints, disassemble, read_memory, write_memory, set_variable, set_expression, goto, goto_targets, step_back, reverse_continue, restart_frame, modules, loaded_sources, exception_info, completions, source, terminate, restart, cancel, step_in_targets, terminate_threads, resolve_address,required
adapter_commandNoDebug adapter executable path or command (e.g. dlv, debugpy, codelldb)
adapter_argsNoDebug adapter command arguments (e.g. [dap] for dlv)
addressNoDebug adapter TCP address host:port (for TCP mode, Phase 2)
launch_argsNoJSON object with launch configuration passed to the adapter (program path, args, env, cwd, etc.). Keys starting with __ are meta fields consumed by this tool and not forwarded to the adapter. Use help(topic=debug) for adapter-specific recipes.
client_idNoDAP client identifier sent in initialize. Default: agent-tool. Set to vscode for vsdbg compatibility.
client_nameNoDAP client display name sent in initialize. Default: agent-tool MCP debug client
source_pathNoAbsolute source file path for breakpoints
breakpointsNoJSON array of breakpoints: [{line: N, condition: '...', hitCondition: '...', logMessage: '...'}]
filtersNoJSON array of exception filter IDs for set_exception_breakpoints (e.g. ["raised","uncaught"])
thread_idNoThread ID (for stack_trace, continue, next, step_in, step_out, pause, goto, step_back, reverse_continue, exception_info). Default: 1
frame_idNoStack frame ID (for scopes, evaluate, set_expression, restart_frame, step_in_targets, completions)
variables_referenceNoVariables reference ID from scopes response (for variables, set_variable, data_breakpoint_info)
expressionNoExpression to evaluate in the debug context
contextNoEvaluation context: watch, repl, hover. Default: repl
nameNoVariable name (for set_variable, data_breakpoint_info)
valueNoNew value (for set_variable, set_expression)
target_idNoTarget ID for goto (from goto_targets response)
lineNoLine number (for goto_targets, completions)
columnNoColumn number (for goto_targets, completions)
textNoText for completions request
memory_referenceNoMemory reference address (for disassemble, read_memory, write_memory)
countNoByte count (read_memory) or instruction count (disassemble)
instruction_offsetNoInstruction offset relative to memory_reference (disassemble)
resolve_symbolsNoResolve symbols in disassembly output: true or false. Default: false
dataNoBase64-encoded data (write_memory)
source_referenceNoSource reference ID (for source request, from stack frame)
start_moduleNoStart index for modules paging
module_countNoNumber of modules to return (0 = all)
thread_idsNoJSON array of thread IDs to terminate (for terminate_threads)
request_idNoPending request ID to cancel
timeout_secNoOperation timeout in seconds. Default: 30, Max: 120
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that it launches debug sessions, uses DAP, and requires system executables. However, it does not name side effects (e.g., process creation, memory writing) or potential risks, which are relevant for an interactive debugger.

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

Conciseness4/5

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

The description is appropriately sized for a complex tool. It is front-loaded with the core purpose and then lists adapters and operations systematically. Every sentence adds information, though the list of operations is extensive but justified for completeness.

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

Completeness5/5

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

Given 33 parameters, no output schema, and no annotations, the description is remarkably complete. It explains the DAP protocol, required adapters, operation modes, and even gives examples for launch_args. The complexity of debug sessions is well-covered.

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

Parameters4/5

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

Schema description coverage is 100%, so baseline is 3. The description adds value by explaining meta fields in launch_args, default values for client_id/client_name, and the purpose of parameters like filters and breakpoints. This goes beyond the schema definitions.

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

Purpose5/5

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

The description clearly states it is an 'Interactive debugger using Debug Adapter Protocol (DAP)' and lists a comprehensive set of operations. It distinguishes itself from sibling tools (none are debuggers) by specifying this unique functionality.

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

Usage Guidelines4/5

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

The description explicitly mentions the requirement of a DAP adapter executable and provides examples for common languages. While it does not explicitly state when not to use, the specialized nature of the tool—debugging—implies appropriate usage context. No alternative tools are suggested, but the extensive operation list clarifies its scope.

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

Install Server

Other Tools

Latest Blog Posts

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/knewstimek/agent-tool'

If you have feedback or need assistance with the MCP directory API, please join our Discord server