list_processes
View all active Node.js processes managed by the debugger server to monitor and control debugging sessions.
Instructions
List all managed Node.js processes
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_processes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:393-410 (handler)The handler function that lists all managed Node.js processes, returning their pid, port, command, startTime, and status as JSON.
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:168-175 (schema)Tool schema definition in ListToolsRequestSchema, specifying the name, description, and empty input schema (no parameters required).
{ name: "list_processes", description: "List all managed Node.js processes", inputSchema: { type: "object", properties: {}, }, }, - src/index.ts:250-252 (registration)Registration in the CallToolRequestSchema handler switch statement, which calls the listProcesses method when the tool is invoked.
case "list_processes": return await this.listProcesses();