Skip to main content
Glama

list_agents

Retrieve and display all active agents connected to the Strands Agent MCP server for integration and management in MCP-compatible systems.

Instructions

list all available agents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_agents' tool. It returns a list of names of all registered agents by iterating over agent_registry.agent_entries. The @mcp.tool decorator registers it with FastMCP and provides the tool description/schema.
    @mcp.tool(description="list all available agents")
    def list_agents() -> List[str]:
        """
        List all registered agents
        """
        return [agent.name for agent in agent_registry.agent_entries]
  • Helper property on the Registry class that provides the list of all AgentEntry instances, which list_agents uses to extract agent names.
    @property
    def agent_entries(self) -> List[AgentEntry]:
        return [entry for entry in self._registry.values()]
  • Builds the agent registry by discovering agents from plugins, populating the agent_entries used by list_agents.
    def build_registry(discovered_plugins: Dict[str, ModuleType]) -> Registry:
        registry = Registry()
        for plugin_name, module in discovered_plugins.items():
            for agent_entry in module.build_agents():
                registry.register(agent_entry)
        return registry
Install Server

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/imgaray/strands-agents-mcp'

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