Skip to main content
Glama

debug_attach

Attach to an already-listening debugpy adapter on localhost or a specified host to debug a running Python process with configurable port, timeout, and path mappings.

Instructions

Attach to an already-listening debugpy adapter on localhost or another explicit host.

Input Schema

NameRequiredDescriptionDefault
hostNo127.0.0.1
portYes
timeoutNo
path_mappingsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, yet it only states the connection target. It says nothing about whether attaching suspends the target process, what happens on timeout, whether the attached session must be stopped with debug_stop, or how connection failures surface.

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?

A single front-loaded sentence with no filler, and the essential concept (attaching to an existing adapter) comes first. It is arguably too terse for a four-parameter tool, but nothing in it is wasted.

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

Completeness2/5

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

For a stateful tool that connects to a live debug adapter, with no annotations, no output schema, and zero parameter documentation, the definition leaves too much unknown. An agent would need to guess at timeout behavior, path mapping semantics, and how the resulting session is torn down.

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

Parameters2/5

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

Schema description coverage is 0% across four parameters, so the description must compensate and largely does not: it gestures at 'localhost or another explicit host' but never explains port, the connection timeout default, or what localRoot/remoteRoot path mappings do and why they matter for breakpoints.

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?

The description gives a specific verb plus resource ('Attach to an already-listening debugpy adapter'), which cleanly separates it from the sibling debug_launch and from session tools like debug_continue. It does not explicitly name those siblings, but the attach-vs-launch distinction is inferable from the wording.

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

Usage Guidelines3/5

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

'already-listening' implies the precondition (an adapter must be running and waiting), which is the key when-to-use signal. However, it never names debug_launch as the alternative for starting a new process, and gives no guidance on what to do when no adapter is listening or which sibling to call afterwards.

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