list_environments
Retrieve all available Lenses environments with their current status, metrics, and metadata for managing Kafka clusters.
Instructions
Lists all Lenses environments.
Returns: A list containing all environments with their details including status, metrics, and metadata.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The core handler function for the 'list_environments' tool. Decorated with @mcp.tool() for registration. Fetches and returns a list of all Lenses environments from the API endpoint /api/v1/environments.@mcp.tool() async def list_environments() -> List[Dict[str, Any]]: """ Lists all Lenses environments. Returns: A list containing all environments with their details including status, metrics, and metadata. """ result = await api_client._make_request("GET", "/api/v1/environments") return result.get("items", [])
- src/lenses_mcp/server.py:28-28 (registration)Invocation of register_environments(mcp) which registers the 'list_environments' tool (and others) with the main FastMCP instance.register_environments(mcp)