list_processes
Retrieve a list of all running and completed AI agent processes with their PID, agent type, and status.
Instructions
List all running and completed AI agent processes. Returns a simple list with PID, agent type, and status for each process.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/process-service.ts:153-165 (helper)The core implementation: listProcesses() iterates the process manager's internal map and returns a list of ProcessListItem objects with pid, agent, and status.
listProcesses(): ProcessListItem[] { const processes: ProcessListItem[] = []; for (const [pid, process] of this.processManager.entries()) { processes.push({ pid, agent: process.toolType, status: process.status, }); } return processes; } - src/app/mcp.ts:375-382 (handler)The MCP tool handler: handleListProcesses() calls processService.listProcesses() and returns the result as JSON text content.
private async handleListProcesses(): Promise<ServerResult> { return { content: [{ type: 'text', text: JSON.stringify(this.processService.listProcesses(), null, 2) }] }; } - src/app/mcp.ts:199-206 (schema)The tool schema/definition registered with the MCP server, including name 'list_processes', description, and empty inputSchema.
{ name: 'list_processes', description: 'List all running and completed AI agent processes. Returns a simple list with PID, agent type, and status for each process.', inputSchema: { type: 'object', properties: {}, }, }, - src/app/mcp.ts:321-322 (registration)The switch-case in the tools handler that routes the 'list_processes' tool name to handleListProcesses().
case 'list_processes': return this.handleListProcesses(); - src/process-service.ts:32-36 (schema)The ProcessListItem interface defining the return type: pid (number), agent (AgentType), status (ProcessStatus).
export interface ProcessListItem { pid: number; agent: AgentType; status: ProcessStatus; }