Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

delete_consumer_group_topic_partition_offset

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

Instructions

Delete the offset for a topic-partition for a given group.

Args: environment: The environment name. group_id: The ID of the consumer group. topic: The topic name. partition: The partition number.

Returns: The result of the delete operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
group_idYes
topicYes
partitionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function implementing the `delete_consumer_group_topic_partition_offset` tool. It constructs an API endpoint and sends a DELETE request to remove the offset for the specified consumer group, topic, and partition.
    @mcp.tool()
    async def delete_consumer_group_topic_partition_offset(
        environment: str, 
        group_id: str, 
        topic: str, 
        partition: int
    ) -> Dict[str, Any]:
        """
        Delete the offset for a topic-partition for a given group.
        
        Args:
            environment: The environment name.
            group_id: The ID of the consumer group.
            topic: The topic name.
            partition: The partition number.
        
        Returns:
            The result of the delete operation.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/consumers/{group_id}/topics/{topic}/partitions/{partition}/offsets"
        return await api_client._make_request("DELETE", endpoint)
  • Registration of the Kafka consumer groups tools module, which includes the `delete_consumer_group_topic_partition_offset` tool, by calling the register function on the MCP instance.
    register_kafka_consumer_groups(mcp)
  • Import of the `register_kafka_consumer_groups` function used to register the tools.
    from tools.kafka_consumer_groups import register_kafka_consumer_groups
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool deletes an offset, implying a destructive mutation, but doesn't mention permissions required, whether the deletion is reversible, rate limits, or error conditions. This leaves significant gaps in understanding the tool's behavior and risks.

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 well-structured and front-loaded with the core purpose, followed by clear sections for arguments and returns. Every sentence earns its place without redundancy, making it efficient and easy to parse.

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 complexity as a destructive operation with no annotations, the description is minimally adequate but incomplete. It covers the basic purpose and parameters but lacks behavioral context, usage guidelines, and error handling. The presence of an output schema reduces the need to explain return values, but more detail on the operation's impact is warranted.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description lists all four parameters with brief explanations (e.g., 'environment: The environment name'), adding meaning beyond the input schema, which has 0% description coverage. However, it doesn't provide details on parameter formats, constraints, or examples, leaving some semantic gaps despite covering all parameters.

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 the offset') and the target resource ('for a topic-partition for a given group'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'delete_consumer_group' or 'delete_consumer_group_offsets', which handle broader deletions.

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 such as 'delete_consumer_group_offsets' (which might delete all offsets for a group) or 'update_consumer_group_topic_partition_offset' (which modifies offsets). The description lacks context on prerequisites, exclusions, or typical scenarios for invocation.

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