Skip to main content
Glama

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

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)

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