Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

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
NameRequiredDescriptionDefault
environmentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • 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)
  • 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)
  • Import of the register_topics function from tools.topics, enabling registration of the 'list_topic_metadata' tool.
    from tools.topics import register_topics
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states it's a list operation, implying read-only behavior, but does not disclose any behavioral traits such as permissions required, rate limits, pagination, or whether it's safe to use. The description adds minimal context beyond the basic action, missing key details for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the main purpose first, followed by structured sections for Args and Returns. It avoids unnecessary fluff, but the 'Args' and 'Returns' labels are slightly redundant since the schema covers this; however, the text is clear and efficient overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 1 parameter, no annotations, and an output schema exists (which handles return values), the description is minimally complete. It explains the parameter and return content, but lacks behavioral context (e.g., safety, performance) and usage guidelines. For a simple list tool, it's adequate but has clear gaps in transparency and guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description includes an 'Args' section that explains the 'environment' parameter as 'The environment name', adding meaning beyond the input schema which has 0% description coverage. With only 1 parameter, this compensates well, though it could provide more context (e.g., what environments are valid). Baseline is 4 due to low parameter count and adequate explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'List all topic metadata' which provides a clear verb ('List') and resource ('topic metadata'), distinguishing it from siblings like 'get_topic_metadata' or 'list_topics'. However, it lacks specificity about what 'topic metadata' includes beyond the returns section mentioning 'schemas and descriptions', making it somewhat vague rather than highly specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. For example, it does not differentiate from 'get_topic_metadata' (which might fetch metadata for a specific topic) or 'list_topics' (which might list topic names only). There is no mention of prerequisites, context, or exclusions, leaving usage unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lensesio/lenses-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server