Skip to main content
Glama

list_consumer_groups_by_topic

Identify which consumer groups are subscribed to a specific Kafka topic to monitor data consumption patterns and group activity.

Instructions

Retrieve a list of consumer groups by a specific topic.

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

Returns: A list of consumer group objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
topicYes

Implementation Reference

  • The tool handler function decorated with @mcp.tool(), implementing the logic to list consumer groups for a given topic by making an API GET request.
    @mcp.tool() async def list_consumer_groups_by_topic(environment: str, topic: str) -> List[Dict[str, Any]]: """ Retrieve a list of consumer groups by a specific topic. Args: environment: The environment name. topic: The name of the topic. Returns: A list of consumer group objects. """ endpoint = f"/api/v1/environments/{environment}/proxy/api/consumers/{topic}" return await api_client._make_request("GET", endpoint)
  • Top-level call to register_kafka_consumer_groups which registers the list_consumer_groups_by_topic tool (and other Kafka consumer group tools).
    register_kafka_consumer_groups(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