Skip to main content
Glama
lensesio

Lenses MCP Server

by lensesio

update_topic_config

Modify Kafka topic settings like retention time and other configurations across different environments using the Lenses MCP Server.

Instructions

Update topic configuration.

Args: environment: The environment name. topic_name: Name of the topic. configs: List of config key-value pairs [{"key": "retention.ms", "value": "86400000"}].

Returns: Success message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYes
topic_nameYes
configsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'update_topic_config' tool. It constructs a payload with the configs and sends a PUT request to the Lenses API endpoint to update the topic configuration.
    @mcp.tool()
    async def update_topic_config(
        environment: str, 
        topic_name: str, 
        configs: List[Dict[str, str]]
    ) -> str:
        """
        Update topic configuration.
        
        Args:
            environment: The environment name.
            topic_name: Name of the topic.
            configs: List of config key-value pairs [{"key": "retention.ms", "value": "86400000"}].
        
        Returns:
            Success message.
        """
        payload = {"configs": configs}
        endpoint = f"/api/v1/environments/{environment}/proxy/api/configs/topics/{topic_name}"
        return await api_client._make_request("PUT", endpoint, payload)
  • Invokes register_topics(mcp) which registers the update_topic_config tool (among others) with the MCP server.
    register_topics(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 but offers minimal behavioral insight. It states it's an update operation, implying mutation, but doesn't disclose critical traits like required permissions, whether changes are reversible, rate limits, or error conditions. The 'Returns' section mentions a success message but lacks detail on format or potential failures.

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 front-loaded with the core purpose, followed by structured sections for Args and Returns. Each sentence serves a clear function, with no redundant information. However, the Args section could be more integrated into the main description for better flow.

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 complexity (3 required parameters, mutation operation) and lack of annotations, the description is moderately complete. It covers parameters and return value basics, and an output schema exists, so detailed return explanations aren't needed. However, it misses behavioral context like side effects or error handling, which is important for a configuration update tool.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates well by explaining all three parameters: 'environment' as the environment name, 'topic_name' as the topic name, and 'configs' as a list of key-value pairs with an example. This adds meaningful context beyond the bare schema, though it could specify allowed config keys or value formats more explicitly.

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 'topic configuration', making the purpose specific and understandable. It distinguishes from siblings like 'create_topic' or 'get_topic' by focusing on configuration updates rather than creation or retrieval. However, it doesn't explicitly differentiate from 'update_topic_metadata', which might handle different aspects of topic updates.

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 like needing an existing topic or environment, nor does it compare with siblings such as 'update_topic_metadata' or 'get_topic_broker_configs' for related 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