Skip to main content
Glama

list_active_subagents

View currently active subagents and their operational status to monitor task delegation progress in development workflows.

Instructions

List currently active subagents and their status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_active_subagents' tool. It maps over active subagent sessions, computes durations, and returns a formatted text response listing all active sessions with their details.
    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:119-125 (registration)
    Registration of the 'list_active_subagents' tool in the ListTools response, including name, description, and empty input schema.
    name: 'list_active_subagents', description: 'List currently active subagents and their status', inputSchema: { type: 'object', properties: {} } },
  • Dispatch case in the CallToolRequestHandler that routes calls to the listActiveSubagents handler.
    case 'list_active_subagents': return await this.listActiveSubagents();
  • Input schema for the tool, which expects no parameters (empty properties).
    inputSchema: { type: 'object', properties: {} }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pc-style/goose-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server