Skip to main content
Glama

list_agents

Discover and retrieve all registered A2A protocol agents to enable communication and management through the MCP server bridge.

Instructions

List all registered A2A agents.

Returns: List of registered agents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function decorated with @mcp.tool(), which registers and implements the list_agents tool. It simply returns a list of model_dump() of all registered agents from the global registered_agents dictionary.
    @mcp.tool() async def list_agents() -> List[Dict[str, Any]]: """ List all registered A2A agents. Returns: List of registered agents """ return [agent.model_dump() for agent in registered_agents.values()]
  • Global dictionary that stores the registered agents, which is used by the list_agents tool to return the list.
    registered_agents = {} task_agent_mapping = {}
  • Pydantic model defining the structure of agent information stored in registered_agents and returned by list_agents.
    class AgentInfo(BaseModel): """Information about an A2A agent.""" url: str = Field(description="URL of the A2A agent") name: str = Field(description="Name of the A2A agent") description: str = Field(description="Description of the A2A agent")

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/GongRzhe/A2A-MCP-Server'

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