Skip to main content
Glama

update_consumer_group_offsets

Modify Kafka consumer group offsets for specific topic-partition pairs to control message processing positions in Lenses MCP Server.

Instructions

Update the offset 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 offset objects.

Returns: The result of the update operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
group_idYes
offsetsYes

Implementation Reference

  • The async handler function that implements the tool logic by making a PUT request to the API endpoint to update the consumer group offsets.
    @mcp.tool() async def update_consumer_group_offsets( environment: str, group_id: str, offsets: List[Dict[str, Any]] ) -> Dict[str, Any]: """ Update the offset 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 offset objects. Returns: The result of the update operation. """ endpoint = f"/api/v1/environments/{environment}/proxy/api/consumers/{group_id}/offsets" return await api_client._make_request("PUT", endpoint, json=offsets)
  • Registers the kafka_consumer_groups tools module, which includes the update_consumer_group_offsets tool, with the MCP server.
    register_kafka_consumer_groups(mcp)

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