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 resolve issues in your programs.

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
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 provided, the description carries full burden. It discloses the interactive/session-based nature and external dependency on DAP adapters, but omits details on error handling, session persistence, output format, or state management between operations.

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 front-loaded with the protocol and purpose, followed by capabilities, adapters, and operations. While the exhaustive operation lists (standard and extended) are somewhat verbose, they are appropriate given the tool's complexity and lack of output schema documentation.

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

Completeness4/5

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

For a complex 33-parameter debugging tool with no output schema or annotations, the description adequately covers the protocol, capabilities, adapter requirements, and operational scope. It could benefit from noting that return values vary by operation, but is otherwise complete.

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

Parameters3/5

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

Schema description coverage is 100%, establishing a baseline of 3. The description lists operations and adapter types but does not add significant semantic meaning beyond the schema's detailed parameter descriptions (e.g., not explaining relationships between session_id and operations).

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 identifies the tool as an 'Interactive debugger using Debug Adapter Protocol (DAP)' with specific capabilities (breakpoints, stepping, variable inspection). It distinguishes effectively from siblings (file operations, network tools, databases) by focusing on code debugging with DAP adapters.

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 establishes clear prerequisites ('Requires a DAP adapter executable installed on the system') and provides adapter examples for different languages. However, it lacks explicit 'when not to use' guidance or comparisons to alternatives, though none exist in the sibling set.

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