Skip to main content
Glama

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

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]:

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