client_list
Retrieve a list of currently connected clients to monitor active connections and manage Redis server access.
Instructions
Get a list of connected clients to the Redis server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/server_management.py:35-43 (handler)The core handler function for the 'client_list' MCP tool. It uses RedisConnectionManager to get a Redis connection and calls client_list() to retrieve the list of connected clients, returning the list or an error string on failure. The @mcp.tool() decorator also handles registration.@mcp.tool() async def client_list() -> list: """Get a list of connected clients to the Redis server.""" try: r = RedisConnectionManager.get_connection() clients = r.client_list() return clients except RedisError as e: return f"Error retrieving client list: {str(e)}"
- src/tools/server_management.py:35-35 (registration)The @mcp.tool() decorator on client_list registers it as an MCP tool.@mcp.tool()