list_processes
Retrieve a list of all managed Node.js processes to monitor and debug via the Node.js Debugger MCP Server, enabling efficient process management and debugging.
Instructions
List all managed Node.js processes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:393-410 (handler)The handler function that executes the list_processes tool. It retrieves all managed processes from this.managedProcesses Map, transforms them into a simplified JSON object with pid, port, command, startTime, and status, and returns the JSON string as text content in the MCP response format.private async listProcesses() { const processes = Array.from(this.managedProcesses.values()).map(p => ({ pid: p.pid, port: p.port, command: `${p.command} ${p.args.join(" ")}`, startTime: p.startTime.toISOString(), status: p.process.killed ? 'killed' : 'running' })); return { content: [ { type: "text", text: JSON.stringify(processes, null, 2), }, ], }; }
- src/index.ts:169-175 (registration)The tool registration entry in the list of tools provided to the MCP server via setTools. Includes the name, description, and input schema (empty object since no parameters are required).name: "list_processes", description: "List all managed Node.js processes", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:171-175 (schema)The input schema for the list_processes tool, defining an empty object (no required parameters).inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:250-251 (registration)The dispatch case in the CallToolRequestHandler switch statement that routes calls to the listProcesses handler method.case "list_processes": return await this.listProcesses();