Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

get_topic

Retrieve detailed information about Kafka topics including partitions, consumers, and configuration settings for data management and analysis.

Instructions

Retrieve information about a specific topic.

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

Returns: Detailed topic information including partitions, consumers, config, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
topic_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_topic' MCP tool. Decorated with @mcp.tool() which also handles schema inference from the function signature and docstring, and registers the tool with the FastMCP instance passed to register_topics.
    @mcp.tool()
    async def get_topic(environment: str, topic_name: str) -> Dict[str, Any]:
        """
        Retrieve information about a specific topic.
        
        Args:
            environment: The environment name.
            topic_name: Name of the topic.
        
        Returns:
            Detailed topic information including partitions, consumers, config, etc.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/topics/{topic_name}"
        return await api_client._make_request("GET", endpoint)
  • The call to register_topics(mcp) in the main server setup, which defines and registers the get_topic tool (along with other topic tools) to the MCP server instance.
    register_topics(mcp)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool retrieves information, implying a read-only operation, but does not disclose behavioral traits like authentication needs, rate limits, error conditions, or whether it requires specific permissions. This is a significant gap 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, followed by structured sections for Args and Returns. Each sentence adds value, with no wasted words, though it could be slightly more detailed without losing conciseness.

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 the tool's moderate complexity (2 parameters, no annotations, but has an output schema), the description is somewhat complete. It covers the purpose and parameters briefly, and the output schema likely handles return values, but it lacks behavioral context and usage guidelines, making it adequate but with clear gaps.

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%, so the schema provides no parameter details. The description lists parameters in the Args section with brief names but adds minimal semantics beyond the schema's titles. It partially compensates by indicating what the parameters represent, but does not explain format, constraints, or examples, leaving gaps in understanding.

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 'Retrieve information about a specific topic,' which is a specific verb (retrieve) and resource (topic). It distinguishes from siblings like get_topic_metadata or get_topic_partitions by focusing on comprehensive topic details, though the distinction could be more explicit.

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 like get_topic_metadata or get_topic_partitions. The description lacks context on prerequisites, such as needing an existing topic, and does not mention any exclusions or specific use cases.

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