list_topics
Retrieve detailed information about all Kafka topics in a specified environment to manage and explore data across clusters.
Instructions
Retrieve information about all topics.
Args: environment: The environment name.
Returns: List of all topics with detailed information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environment | Yes |
Implementation Reference
- src/lenses_mcp/tools/topics.py:16-28 (handler)The handler function for the 'list_topics' tool. It makes a GET request to the API endpoint to retrieve all topics for the specified environment.@mcp.tool() async def list_topics(environment: str) -> List[Dict[str, Any]]: """ Retrieve information about all topics. Args: environment: The environment name. Returns: List of all topics with detailed information. """ endpoint = f"/api/v1/environments/{environment}/proxy/api/topics" return await api_client._make_request("GET", endpoint)
- src/lenses_mcp/server.py:33-33 (registration)Top-level registration of the topics tools module, which includes the 'list_topics' tool, by invoking register_topics(mcp).register_topics(mcp)