list_active_subagents
View currently active subagents and their operational status to monitor task delegation across specialized developer roles.
Instructions
List currently active subagents and their status
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_active_subagents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:358-388 (handler)The handler function that retrieves and formats a list of active subagent sessions, including session details like ID, task, agent count, status, and duration.
async listActiveSubagents() { const sessions = Array.from(this.activeSubagents.entries()).map(([id, session]) => ({ session_id: id, task: session.task, agent_count: session.agents.length, execution_mode: session.execution_mode, status: session.status, start_time: session.startTime, end_time: session.endTime || null, duration: session.endTime ? `${Math.round((session.endTime - session.startTime) / 1000)}s` : `${Math.round((new Date() - session.startTime) / 1000)}s (ongoing)` })); return { content: [ { type: 'text', text: sessions.length > 0 ? `Active Subagent Sessions:\n\n${sessions.map(s => `Session: ${s.session_id}\n` + `Task: ${s.task}\n` + `Agents: ${s.agent_count} (${s.execution_mode})\n` + `Status: ${s.status}\n` + `Duration: ${s.duration}\n` ).join('\n')}` : 'No active subagent sessions.' } ] }; } - src/index.js:118-125 (schema)Tool schema definition including name, description, and input schema (empty properties).
{ name: 'list_active_subagents', description: 'List currently active subagents and their status', inputSchema: { type: 'object', properties: {} } }, - src/index.js:153-154 (registration)Registration in the CallToolRequestSchema switch statement that routes calls to the handler method.
case 'list_active_subagents': return await this.listActiveSubagents();