Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

delete_consumer_group_offsets

Remove stored offset data for specific topic-partition assignments in a Kafka consumer group to reset consumption positions or resolve processing issues.

Instructions

Delete offsets for a consumer group topic-partition tuples.

Args: environment: The environment name. group_id: The ID of the consumer group. offsets: A list of topic-partition objects.

Returns: The result of the delete operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
group_idYes
offsetsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that implements the tool logic by constructing the API endpoint and making a POST request to delete the specified consumer group offsets.
    async def delete_consumer_group_offsets(
        environment: str, 
        group_id: str, 
        offsets: List[Dict[str, Any]]
    ) -> Dict[str, Any]:
        """
        Delete offsets for a consumer group topic-partition tuples.
        
        Args:
            environment: The environment name.
            group_id: The ID of the consumer group.
            offsets: A list of topic-partition objects.
        
        Returns:
            The result of the delete operation.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/consumers/{group_id}/offsets/delete"
        return await api_client._make_request("POST", endpoint, json=offsets)
  • The @mcp.tool() decorator directly above the handler registers it as an MCP tool when the register_kafka_consumer_groups function is called.
    @mcp.tool()
  • Top-level call to register_kafka_consumer_groups(mcp) which triggers the registration of the delete_consumer_group_offsets tool among others.
    register_kafka_consumer_groups(mcp)
  • Type annotations in the function signature define the input schema: environment (str), group_id (str), offsets (List[Dict[str, Any]]). The docstring provides further description.
        environment: str, 
        group_id: str, 
        offsets: List[Dict[str, Any]]
    ) -> Dict[str, Any]:
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 this is a delete operation (implying mutation/destruction) but doesn't clarify critical aspects: whether this is irreversible, what permissions are required, if there are rate limits, what happens to consumer group state after deletion, or what format the 'result' return takes. For a destructive operation 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.

Conciseness4/5

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

The description is efficiently structured with clear sections (purpose, args, returns) in just four sentences. Each sentence serves a distinct purpose: stating the action, listing parameters, and describing the return. There's no redundant information, though the parameter explanations are overly brief given the 0% schema coverage.

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 a destructive operation with 3 parameters (0% schema coverage) but with an output schema present, the description is minimally adequate. The output schema means return values don't need explanation, but the description lacks crucial context for a delete operation: no warnings about irreversibility, no permission requirements, no examples of offset objects. It meets basic requirements but leaves significant gaps for safe usage.

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

Parameters2/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 lists the three parameters with brief labels but provides no semantic context: 'environment' (what environments exist?), 'group_id' (format/constraints?), 'offsets' (structure of 'topic-partition objects'?). The description adds minimal value beyond parameter names, failing to explain what these parameters mean or how they should be used.

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 action ('Delete offsets') and target ('for a consumer group topic-partition tuples'), making the purpose immediately understandable. It distinguishes from sibling tools like 'delete_consumer_group' (which deletes the entire group) and 'update_consumer_group_offsets' (which updates rather than deletes offsets). However, it doesn't specify the exact resource being deleted (offsets for specific partitions) with maximum precision.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing the consumer group to exist), when-not-to-use scenarios (e.g., if offsets need preservation), or comparisons to similar tools like 'delete_consumer_group_topic_partition_offset' (which appears to handle single offsets). The agent receives no usage context beyond the basic purpose.

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