Skip to main content
Glama

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

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

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