Skip to main content
Glama

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
NameRequiredDescriptionDefault
agentIdYesID of the agent that handled the task
taskIdYesID of the task to retrieve

Implementation Reference

  • 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), }, ], }; }
  • 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"], }, },

Other Tools

Related Tools

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/tesla0225/mcp-a2a'

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