Skip to main content
Glama

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

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)

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/stereosky/lenses-mcp'

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