Skip to main content
Glama

debug_attach

Attach a debug adapter to an already-running process and bind breakpoints before it resumes, so suspended programs can be stopped for inspection.

Instructions

Attach a debug adapter to an already-running process. Pass breakpoints here rather than afterwards: they bind before the debuggee resumes, which is the only reliable way to stop a process started suspended (e.g. JDWP suspend=y). With breakpoints or exception breakpoints, waits and reports stopped, terminated, or timeout.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "adapter": "<adapter>"
    },
    "name": "debug_attach"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostNoHost to attach to (default: localhost)
portNoDebug port to attach to
adapterYesAdapter type to use
timeoutNoWait timeout in milliseconds (default: 30000)
processIdNoPID of process to attach to
breakpointsNoBreakpoints to bind before the debuggee resumes
waitForStopNoWait for stopped/terminated outcome; defaults to true when breakpoints or exception breakpoints are given
attachConfigNoArbitrary attach configuration properties
adapterConfigNoOverride adapter config inline
exceptionBreakpointsNoException filter IDs (e.g. ['uncaughtExceptions'])

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.19

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and adds useful detail about blocking behavior, breakpoint binding before resume, and stopped/terminated/timeout outcomes. It still does not cover permissions, detach semantics, or whether attaching itself affects process state beyond the wait behavior.

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 compact and front-loaded, with the core action first and the breakpoint timing caveat immediately after. It is appropriately sized, though the 'only reliable way' phrasing is slightly more emphatic than needed.

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

Completeness3/5

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

For a 10-parameter attach tool with nested objects and no annotations or output schema, the description covers the most important timing and wait behavior but leaves several configuration parameters unexplained. The rich schema compensates partly, but the description is not 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.

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds real meaning for the breakpoints and wait semantics, including why breakpoints should be supplied here and when waiting occurs. It does not explain host, port, processId, attachConfig, or adapterConfig selection.

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

Purpose4/5

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

States a specific verb and resource: attaching a debug adapter to an already-running process. The phrase 'already-running' helps distinguish it from launch-style siblings, though it does not explicitly name alternatives.

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?

Gives clear usage guidance: pass breakpoints at attach time rather than afterwards, especially for processes started suspended such as JDWP suspend=y. It does not explicitly exclude cases where debug_launch or debug_at would be more appropriate.

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