Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

get_topic_metadata

Retrieve metadata including schema details and tags for a specific Kafka topic in a given environment.

Instructions

Get metadata for a specific topic.

Args: environment: The environment name. topic_name: Name of the topic.

Returns: Topic metadata including schema information and tags.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
topic_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function implementing the 'get_topic_metadata' MCP tool. It fetches topic metadata via an API GET request to the specified endpoint.
    @mcp.tool()
    async def get_topic_metadata(environment: str, topic_name: str) -> Dict[str, Any]:
        """
        Get metadata for a specific topic.
        
        Args:
            environment: The environment name.
            topic_name: Name of the topic.
        
        Returns:
            Topic metadata including schema information and tags.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/metadata/topics/{topic_name}"
        return await api_client._make_request("GET", endpoint)
  • The call to register_topics(mcp) which executes the definition and registration (via @mcp.tool() decorator) of the 'get_topic_metadata' tool.
    register_topics(mcp)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a 'Get' operation, implying read-only behavior, but doesn't clarify permissions needed, error conditions, rate limits, or what happens if the topic doesn't exist. The mention of returns is minimal and doesn't detail format or structure.

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 well-structured with clear sections (purpose, Args, Returns) and uses minimal sentences. Each part adds value without redundancy, though the Returns section could be more detailed if not for the output schema.

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

Completeness4/5

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

Given the tool's moderate complexity (2 required parameters), no annotations, but an output schema present, the description is reasonably complete. It covers the purpose and parameters, and the output schema likely handles return value details, reducing the need for extensive description. However, more behavioral context would improve completeness.

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

Parameters3/5

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

Schema description coverage is 0%, but the description's Args section documents both parameters ('environment' and 'topic_name') with brief explanations. This adds meaning beyond the bare schema, though it doesn't specify format constraints (e.g., valid environment names) or examples. With two parameters covered, it meets the baseline for partial compensation.

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

Purpose4/5

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

The description clearly states the tool's purpose with 'Get metadata for a specific topic', specifying both the verb ('Get') and resource ('metadata for a specific topic'). It distinguishes from siblings like 'list_topic_metadata' (which likely lists multiple topics) by focusing on a single topic, but doesn't explicitly contrast with 'get_topic' or 'get_topic_partitions'.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention when to choose this over 'get_topic', 'list_topic_metadata', or other metadata-related siblings, nor does it specify prerequisites or contextual constraints for usage.

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