Skip to main content
Glama

a2a_agent_info

Retrieve details about connected A2A agents, including their status and capabilities, to monitor and manage agent interactions within the protocol.

Instructions

Get information about the connected A2A agents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentIdNoOptional agent ID. If not provided, information for all agents will be returned

Implementation Reference

  • index.ts:117-129 (registration)
    Registration of the 'a2a_agent_info' tool in the ListTools response, including name, description, and input schema.
    { name: "a2a_agent_info", description: "Get information about the connected A2A agents", inputSchema: { type: "object", properties: { agentId: { type: "string", description: "Optional agent ID. If not provided, information for all agents will be returned", }, }, }, },
  • The handler logic for the 'a2a_agent_info' tool within the CallToolRequestSchema switch statement. It fetches and returns agent card information for a specific agent or all connected agents via agentManager clients.
    case "a2a_agent_info": { const { agentId } = args as { agentId?: string }; if (agentId) { const client = agentManager.getClientById(agentId); if (!client) { throw new Error(`No agent found with ID ${agentId}`); } const card = await client.agentCard(); return { content: [ { type: "text", text: JSON.stringify(card, null, 2), }, ], }; } else { const results = []; for (const [id, client] of agentManager.getAllClients()) { try { const card = await client.agentCard(); results.push({ agentId: id, card }); } catch (error) { results.push({ agentId: id, error: error instanceof Error ? error.message : String(error) }); } } return { content: [ { type: "text", text: JSON.stringify(results, null, 2), }, ], }; } }

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