a2a_get_task
Retrieve the current status and details of a specific task in the A2A Client MCP Server by providing the task ID and agent ID for tracking and monitoring purposes.
Instructions
Get the current state of a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | ID of the task to retrieve | |
| agentId | Yes | ID of the agent that handled the task |
Implementation Reference
- index.ts:164-181 (handler)MCP tool handler for 'a2a_get_task': destructures taskId and agentId from arguments, retrieves the A2AClient via agentManager, calls client.getTask(), and returns the result as JSON text content.case "a2a_get_task": { const { taskId, agentId } = args as { taskId: string; agentId: string }; const client = agentManager.getClientById(agentId); if (!client) { throw new Error(`No agent found with ID ${agentId}`); } const result = await client.getTask({ id: taskId }); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- index.ts:58-71 (schema)Input schema for 'a2a_get_task' tool defining required taskId and agentId parameters.inputSchema: { type: "object", properties: { taskId: { type: "string", description: "ID of the task to retrieve", }, agentId: { type: "string", description: "ID of the agent that handled the task", }, }, required: ["taskId", "agentId"], },
- index.ts:55-72 (registration)Registration of 'a2a_get_task' tool in the ListTools response, including name, description, and input schema.{ name: "a2a_get_task", description: "Get the current state of a task", inputSchema: { type: "object", properties: { taskId: { type: "string", description: "ID of the task to retrieve", }, agentId: { type: "string", description: "ID of the agent that handled the task", }, }, required: ["taskId", "agentId"], }, },