Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

resend_message

Resend a Kafka message to a specified topic, partition, and offset for reprocessing or recovery in data pipelines.

Instructions

Resend a Kafka message.

Args: environment: The environment name. topic_name: Name of the topic. partition: Kafka partition number. offset: Kafka offset.

Returns: Resend operation result with partition and offset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
topic_nameYes
partitionYes
offsetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'resend_message' tool. It is decorated with @mcp.tool() for automatic registration and schema inference from signature and docstring. Performs a PUT request to the Lenses API to resend the specified Kafka message.
    @mcp.tool()
    async def resend_message(
        environment: str, 
        topic_name: str, 
        partition: int, 
        offset: int
    ) -> Dict[str, Any]:
        """
        Resend a Kafka message.
        
        Args:
            environment: The environment name.
            topic_name: Name of the topic.
            partition: Kafka partition number.
            offset: Kafka offset.
        
        Returns:
            Resend operation result with partition and offset.
        """
        endpoint = f"/api/v1/environments/{environment}/proxy/api/topics/{topic_name}/{partition}/{offset}/resend"
        return await api_client._make_request("PUT", endpoint)
  • Top-level registration of the topics module, which includes the 'resend_message' tool, by calling register_topics on the FastMCP instance.
    register_topics(mcp)
  • Import of the register_topics function required to register the tools including 'resend_message'.
    from tools.topics import register_topics
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 ('resend') but doesn't explain what 'resend' means operationally: Does it duplicate the message? Replay it to consumers? Does it affect message ordering or delivery guarantees? Are there side effects on the original message? No information about permissions, rate limits, idempotency, or error conditions is provided.

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 appropriately sized and well-structured: a clear purpose statement followed by 'Args:' and 'Returns:' sections. Every sentence earns its place, though the parameter listings are minimal. It's front-loaded with the core functionality. Some minor verbosity exists in repeating parameter names that are already in the schema.

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 tool's moderate complexity (4 required parameters, no annotations, but with an output schema), the description is partially complete. The output schema existence means return values don't need explanation, but the description lacks crucial behavioral context for a mutation tool ('resend' implies write operation). It covers the basic what but not the how, when, or why, leaving significant gaps for the agent to navigate.

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 schema provides only parameter names and types without descriptions. The description lists the four parameters but doesn't add meaningful semantics beyond their names. It doesn't explain what 'environment' refers to (e.g., dev/prod), valid ranges for 'partition' and 'offset', or format expectations for 'topic_name'. The baseline would be lower, but the description at least enumerates the parameters, providing minimal context.

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 tool's purpose: 'Resend a Kafka message' - a specific verb ('resend') and resource ('Kafka message'). It distinguishes itself from siblings like 'update_consumer_group_offsets' or 'delete_consumer_group_topic_partition_offset' by focusing on message resending rather than offset management or deletion. However, it doesn't explicitly differentiate from all siblings in the description text itself.

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. It doesn't mention prerequisites (e.g., needing an existing message at the specified offset), when-not-to-use scenarios, or related tools like 'update_consumer_group_offsets' that might handle similar Kafka operations. The agent must infer usage from the tool name alone.

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