list_topic_metadata
Retrieve metadata for Kafka topics including schemas and descriptions to manage and explore data across clusters.
Instructions
List all topic metadata.
Args: environment: The environment name.
Returns: List of topic metadata including schemas and descriptions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environment | Yes |
Implementation Reference
- src/lenses_mcp/tools/topics.py:239-252 (handler)The handler function for the 'list_topic_metadata' tool. Decorated with @mcp.tool() for automatic registration and schema inference from signature and docstring. Executes a GET request to the API to list all topic metadata.@mcp.tool() async def list_topic_metadata(environment: str) -> List[Dict[str, Any]]: """ List all topic metadata. Args: environment: The environment name. Returns: List of topic metadata including schemas and descriptions. """ endpoint = f"/api/v1/environments/{environment}/proxy/api/metadata/topics" return await api_client._make_request("GET", endpoint)
- src/lenses_mcp/server.py:33-33 (registration)The call to register_topics(mcp) in the main server file, which defines and registers all topic-related tools, including 'list_topic_metadata'.register_topics(mcp)
- src/lenses_mcp/server.py:17-17 (registration)Import of the register_topics function from tools.topics, enabling registration of the 'list_topic_metadata' tool.from tools.topics import register_topics