Skip to main content
Glama

Attach to a running Node process

attach

Connect to a Node.js process already running with --inspect or --inspect-brk to debug it over the V8 Inspector protocol. Detaching leaves the process running.

Instructions

Attach to a process already started with node --inspect or --inspect-brk (default 127.0.0.1:9229). Does not take ownership of the process; disconnect detaches and lets it keep running. Breakpoint paths are resolved against the server's cwd unless they're absolute.

Input Schema

NameRequiredDescriptionDefault
hostNo127.0.0.1
portNo
ws_urlNoExplicit ws:// debugger URL, if discovery via /json/list isn't possible.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does so well: it discloses that the tool does not take ownership, that disconnect merely detaches and leaves the process running, and how breakpoint paths resolve against the server cwd. What is missing is any note on failure modes (e.g. what happens if nothing is listening on the port).

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

Conciseness5/5

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

Three tight sentences, front-loaded with the connection requirement, then lifecycle behavior, then a path-resolution caveat. No filler and nothing that repeats the name or title.

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 three-parameter tool with no annotations and no output schema, the description covers the important operational facts: how to connect, that it is non-owning, and detach semantics. It is nearly complete; only connection-failure behavior is unaddressed.

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 coverage is only 33% (just ws_url), so the description has to compensate and partly does by stating the default 127.0.0.1:9229 address, covering host and port. However, those defaults are also already declared in the schema, so the added meaning is marginal and ws_url's fallback semantics are left entirely to the schema.

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?

States a specific verb (attach) and resource (a Node process already running under --inspect/--inspect-brk), and the phrase 'already started' cleanly separates it from the sibling launch, which presumably starts a new process. An agent can pick between attach and launch without opening either schema.

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 a clear precondition for use: the target process must already have been started with `node --inspect` or `--inspect-brk`, with the default endpoint spelled out. It stops short of naming launch as the alternative when no such process exists, so it is clear context rather than a full when/when-not routing statement.

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