a2a_get_task
Retrieve the current state of a specific task by providing its task ID and the agent ID that handled it, enabling task tracking and management.
Instructions
Get the current state of a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agentId | Yes | ID of the agent that handled the task | |
| taskId | Yes | ID of the task to retrieve |
Implementation Reference
- index.ts:164-181 (handler)Handler implementation for the 'a2a_get_task' tool. Retrieves the agent client by ID, fetches the task status using client.getTask(), and returns the result as formatted JSON text.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 definition for the 'a2a_get_task' tool, specifying 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 the '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"], }, },