Skip to main content
Glama
XC881

xcnodejs-debugger-mcp

by XC881

Attach to inspector

debug_attach
Destructive

Attach to a running Node.js inspector by WebSocket URL, host/port, or process ID, then return a new session ID for debugging.

Instructions

Attach to an existing Node inspector on loopback and return a new sessionId. Provide wsUrl, host+port (GET /json/list), or pid (enables inspector if needed). Runs the target as the MCP user. launch executes a process; evaluate runs JavaScript inside it. Only use on a trusted local workspace. Inspector is bound to 127.0.0.1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNoAttach by process id. Enables the inspector with process._debugProcess or SIGUSR1 if it is not already listening. Loopback only
hostNoInspector host. Default 127.0.0.1. Non-loopback is rejected
portNoInspector HTTP port used for /json/list
labelNoOptional label shown in debug_list_sessions
wsUrlNoFull inspector WebSocket URL, e.g. ws://127.0.0.1:9229/<uuid>

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already mark this as destructive, but the description adds useful behavioral detail: it can enable the inspector via pid, runs the target as the MCP user, enforces loopback, and returns a sessionId. This goes beyond the annotation flags and helps the agent understand the side effects and safety boundary.

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-loads the essential action and return value. Each sentence contributes: attachment mode, side-effect caveat, tool distinction, and security constraint. The mention of evaluate is somewhat adjacent to debug_attach but still helps clarify the tool's boundary.

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?

Given five optional parameters, 100% schema coverage, no output schema, and no required fields, the description covers the key operational details: what it returns, how to specify a target, loopback enforcement, and the trust requirement. It could state the selection precedence among wsUrl, host+port, and pid more explicitly, but it is largely 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%, so the parameters are already well documented. The description adds some grouping value by naming the three attachment modes (wsUrl, host+port, pid), but it does not need to repeat schema details. This is a solid baseline-3 score for parameter semantics.

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 states a specific action ('Attach to an existing Node inspector'), the target resource, the loopback scope, and the return value ('return a new sessionId'). It also references sibling tools like launch and evaluate in a way that distinguishes this attachment action from process launch and JS evaluation.

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 clearly frames when this tool applies: when there is an existing Node inspector to attach to, and it lists the accepted attachment routes. It contrasts with launch and evaluate, which helps route to siblings, though it does not explicitly say 'use debug_launch when you need to start a new process' as a direct exclusion.

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