Skip to main content
Glama

debug

Launch and control debug sessions for multiple programming languages using the Debug Adapter Protocol. Set breakpoints, step through code, inspect variables, and evaluate expressions to identify and fix issues.

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: '...', hit_condition: '...', log_message: '...'}]
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
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

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