Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Update' implies mutation, it doesn't specify whether this operation is destructive, requires specific permissions, has rate limits, or what happens to existing offsets not mentioned. The description mentions it returns 'The result of the update operation' but doesn't explain what that result contains or format.

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 efficiently structured with a clear purpose statement followed by Args and Returns sections. Every sentence serves a purpose, though the parameter explanations could be more informative. The formatting is clean and front-loaded with the core functionality.

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 this is a mutation tool with 3 parameters, 0% schema coverage, no annotations, but has an output schema, the description is minimally adequate. The presence of an output schema reduces the need to document return values, but the description lacks important context about the mutation's behavior, parameter details, and differentiation from sibling tools.

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

Parameters2/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. It lists the three parameters but provides minimal semantic context: 'environment' is just 'The environment name', 'group_id' is 'The ID of the consumer group', and 'offsets' is 'A list of topic-partition offset objects' without explaining what those objects contain or their expected structure.

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 ('Update the offset') and target ('for a consumer group topic-partition tuples'), providing specific verb+resource. However, it doesn't explicitly distinguish this tool from its sibling 'update_consumer_group_topic_partition_offset', which appears to be a more targeted version of the same operation.

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 like 'update_consumer_group_topic_partition_offset' or 'delete_consumer_group_offsets'. There's no mention of prerequisites, typical use cases, or when this batch update approach is preferable to single-partition updates.

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