Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

update_consumer_group_topic_partition_offset

Modify consumer group offsets for specific Kafka topic partitions to control data consumption or recover from processing issues.

Instructions

Update 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. offset: The new offset value.

Returns: The result of the update operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
group_idYes
topicYes
partitionYes
offsetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function that implements the tool logic by constructing the API endpoint and making a PUT request to update the Kafka consumer group topic partition offset using the api_client.
    async def update_consumer_group_topic_partition_offset(
        environment: str, 
        group_id: str, 
        topic: str, 
        partition: int, 
        offset: int
    ) -> Dict[str, Any]:
        """
        Update 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.
            offset: The new offset value.
        
        Returns:
            The result of the update operation.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/consumers/{group_id}/offsets/topics/{topic}/partitions/{partition}"
        payload = {"offset": offset}
        return await api_client._make_request("PUT", endpoint, json=payload)
  • Registers all Kafka consumer groups tools, including the update_consumer_group_topic_partition_offset tool, by calling the register_kafka_consumer_groups function on the MCP instance.
    register_kafka_consumer_groups(mcp)
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 action ('Update the offset') but fails to mention critical details like required permissions, whether the operation is idempotent, potential side effects (e.g., impact on consumer group state), or error handling. This leaves significant gaps for an AI agent to understand the tool's behavior beyond basic functionality.

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 structured with a clear purpose statement followed by 'Args' and 'Returns' sections, making it easy to parse. It avoids unnecessary verbosity, though the parameter explanations are minimal. Every sentence serves a purpose, but the lack of deeper context slightly reduces efficiency.

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 complexity of a 5-parameter mutation tool with no annotations, the description is moderately complete: it covers the basic operation and parameters. However, it lacks details on behavioral traits, usage context, and output specifics, despite having an output schema. For a tool that modifies consumer group offsets, more guidance on implications and alternatives would enhance completeness.

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

Parameters3/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 by explaining parameters. It lists all five parameters with brief labels (e.g., 'environment: The environment name'), adding minimal semantic context beyond the schema's titles. However, it does not clarify parameter relationships, valid ranges (e.g., for 'offset'), or examples, providing only basic definitions that partially address the coverage gap.

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 verb ('Update') and resource ('offset for a topic-partition for a given group'), making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'update_consumer_group_offsets' or 'delete_consumer_group_topic_partition_offset', which handle similar resources but with different operations.

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, such as 'update_consumer_group_offsets' (which might update multiple offsets) or 'delete_consumer_group_topic_partition_offset' (which removes an offset). It lacks context on prerequisites, error conditions, or typical use cases, offering only basic parameter information.

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