Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

list_consumer_groups

Retrieve all Kafka consumer groups from a specified environment to monitor and manage data consumption across clusters.

Instructions

Retrieve a list of all Kafka consumer groups.

Args: environment: The environment name.

Returns: A list of consumer group objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function that executes the list_consumer_groups tool logic by querying the API for consumer groups in the given environment.
    @mcp.tool()
    async def list_consumer_groups(environment: str) -> List[Dict[str, Any]]:
        """
        Retrieve a list of all Kafka consumer groups.
        
        Args:
            environment: The environment name.
        
        Returns:
            A list of consumer group objects.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/consumers"
        return await api_client._make_request("GET", endpoint)
  • Registers the kafka_consumer_groups tools (including list_consumer_groups) with the FastMCP server instance.
    register_kafka_consumer_groups(mcp)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'retrieves' a list, implying a read-only operation, but doesn't specify permissions needed, rate limits, pagination behavior, or what happens if the environment doesn't exist. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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

Conciseness5/5

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

The description is efficiently structured with a clear purpose statement followed by separate Args and Returns sections. Every sentence earns its place: the first states what the tool does, the second documents the parameter, and the third describes the return value. No wasted words.

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 has an output schema (which handles return value documentation) and only one parameter, the description is reasonably complete. It covers the basic purpose and parameter, though it could better address behavioral aspects given the lack of annotations. For a simple list operation, this provides adequate context.

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 description must compensate. It documents the single parameter 'environment' in the Args section, adding meaning beyond the bare schema. However, it doesn't explain what constitutes a valid environment name, provide examples, or describe format constraints, leaving some semantic gaps.

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 verb ('Retrieve') and resource ('list of all Kafka consumer groups'), making the purpose explicit. It distinguishes from sibling 'list_consumer_groups_by_topic' by specifying 'all' groups rather than filtered by topic. However, it doesn't explicitly contrast with other list operations like 'list_topics' or 'list_datasets'.

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 sibling tools like 'list_consumer_groups_by_topic' for topic-filtered lists or 'get_environment' for environment details. It also lacks prerequisites or context about when this operation is appropriate.

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