get_subagent_results
Retrieve completed task outputs from autonomous developer teams after delegating work to specialized agents for parallel or sequential execution.
Instructions
Get results from completed subagents
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>"
},
"name": "get_subagent_results"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID to get results for |
Implementation Reference
- src/index.js:390-414 (handler)The handler function that retrieves subagent session results by session_id, checks if session exists, and returns formatted output including task details, status, output, and any errors.
async getSubagentResults(args) { const { session_id } = args; if (!this.activeSubagents.has(session_id)) { throw new McpError( ErrorCode.InvalidRequest, `Session ${session_id} not found` ); } const session = this.activeSubagents.get(session_id); return { content: [ { type: 'text', text: `Subagent Session Results\n\nSession ID: ${session_id}\nTask: ${session.task}\nStatus: ${session.status}\nExecution Mode: ${session.execution_mode}\nAgents: ${session.agents.length}\n\n` + `Start Time: ${session.startTime}\n` + `End Time: ${session.endTime || 'Still running'}\n\n` + `Output:\n${session.output || 'No output yet'}\n\n` + `${session.error ? `Errors:\n${session.error}` : ''}` } ] }; } - src/index.js:126-139 (schema)Tool schema definition in the listTools response, specifying the name, description, and input schema requiring a session_id.
{ name: 'get_subagent_results', description: 'Get results from completed subagents', inputSchema: { type: 'object', properties: { session_id: { type: 'string', description: 'Session ID to get results for' } }, required: ['session_id'] } } - src/index.js:155-156 (registration)Registration in the CallToolRequestHandler switch statement that dispatches calls to the getSubagentResults handler.
case 'get_subagent_results': return await this.getSubagentResults(args);