Skip to main content
Glama

alter_topic_config

Set or remove Kafka topic config overrides for up to 1,000 topics in one batch, preview changes first, and require confirmation before applying incremental updates.

Instructions

Change topic-level configuration of 1 to 1000 topics in one call through items. Each item sets keys (set) and removes overrides so the cluster default applies again (delete). Every key not named keeps its value: changes are incremental, never a full replace. Changing one topic is an items array of length one.

No change is made unless confirm is true. The preview asks the broker to validate every item and returns, per key, the current value and its source (DYNAMIC_TOPIC_CONFIG means a deliberate topic setting; anything else is inherited) next to the requested value. Shortening retention.ms reports how many messages are already older than the new limit, because they become eligible for deletion straight away. Changing cleanup.policy or retention.bytes is warned about.

One confirm covers the whole batch, and applying is not atomic: topics changed before a later item failed stay changed. Results follow items order, each carrying index with result or error. Requires Kafka ALTER_CONFIGS permission.

Input Schema

NameRequiredDescriptionDefault
itemsYesThe topics to change, 1 to 1000 of them. Changing one topic is an array of length one. Duplicate topic names are refused before anything changes.
confirmNoOptional. When false or omitted, nothing is changed: the broker validates every item and the response shows each key's current and requested value. Must be true to apply. One confirm covers the whole batch.

Output Schema

NameRequiredDescriptionDefault
atomicYes
failedYes
appliedYes
resultsYes
succeededYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.7
    • changedInput schema / properties / items / description
      Previous value: -"The topics to change, 1 to 100 of them. Changing one topic is an array of length one. Duplicate topic names are refused before anything changes."New value: +"The topics to change, 1 to 1000 of them. Changing one topic is an array of length one. Duplicate topic names are refused before anything changes."
  2. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: non-atomic batches, incremental merge semantics, duplicate-topic refusal, per-key source reporting (DYNAMIC_TOPIC_CONFIG vs inherited), retention.ms deletion side effect, warnings for cleanup.policy/retention.bytes, and the required Kafka ALTER_CONFIGS permission. These are exactly the traits an agent needs and none are in structured fields.

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?

Front-loaded with purpose and incremental semantics, and nearly every sentence carries a distinct behavioral fact with no filler. It is dense but slightly sprawling: warnings and atomicity could be grouped more tightly, and the permission requirement sits at the very end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and a nested items array, the description covers safety (confirm gate), failure modes (non-atomic, per-item errors), side effects (retention eligibility, cleanup.policy warnings) and permissions. An output schema exists, so return-value shape is correctly left to it.

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 coverage is 100%, so the schema already documents items, set, delete, topic and confirm. The description still adds value by clarifying that one confirm covers the whole batch, that per-key results carry index in items order, and that set/delete are mutually exclusive at the key level.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Change) and resource (topic-level configuration) with the exact scale (1 to 1000 topics) and the two per-item operations (set/delete). No sibling tool touches topic configs, and the description makes the boundary with add_partitions/create_topic obvious.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains the payload shape, that changes are incremental rather than full replaces, that one topic is an items array of length one, and that nothing happens unless confirm is true, which effectively describes a preview mode. It stops short of naming explicit alternatives (e.g. server_config for broker-level defaults), but the when-to-use context is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.