Skip to main content
Glama

agent_list

Retrieve agent information including ID, name, room, and connection status for cross-device AI agent communication.

Instructions

Lihat info agent ini: ID, nama, room, status koneksi.

Returns: str: JSON info agent

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'agent_list' MCP tool. Returns a JSON object containing the current agent's ID, name, session ID, stable identity ID, current room info, connection status, retry queue count, and server URL.
    @mcp.tool(name="agent_list")
    async def agent_list() -> str:
        """
        Lihat info agent ini: ID, nama, room, status koneksi.
    
        Returns:
            str: JSON info agent
        """
        return json.dumps({"my_agent_id": agent_id, "my_name": agent_name,
            "client_session_id": client_session_id,
            "stable_agent_identity_id": stable_agent_identity_id,
            "current_room": current_room, "connected": ws_conn is not None,
            "local_retry_queue_count": len(_retry_queue()) if current_room else 0,
            "server": AGENTLINK_URL}, indent=2)
  • Registration of the 'agent_list' tool with the FastMCP server using the @mcp.tool decorator. The tool is registered with the name 'agent_list' and takes no input parameters.
    @mcp.tool(name="agent_list")

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/syuaibsyuaib/ssyubix-agentlink'

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