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
| Name | Required | Description | Default |
|---|---|---|---|
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) - python/src/agentlink_mcp/server.py:2187-2187 (registration)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")