Skip to main content
Glama

create_topic

Creates up to 1000 Kafka topics in one batch with optional partitions, replication factor and configs. Validates requests first; confirm true is required before any topic is created.

Instructions

Create 1 to 1000 Kafka topics in one call through items, each with optional partition count, replication factor and topic-level configs. Omitted values use broker defaults. Existing topics are refused rather than modified. Creating one topic is an items array of length one.

No topic is created unless confirm is true; otherwise the broker only validates the requests. One confirm covers the whole batch, and creation is not atomic: topics created before a later item failed stay, because Kafka cannot roll them back. Results follow items order, each carrying index with result or error.

Partition counts cannot be reduced later. Requires Kafka CREATE permission.

Input Schema

NameRequiredDescriptionDefault
itemsYesThe topics to create, 1 to 1000 of them. Creating one topic is an array of length one. Duplicate topic names are refused before anything is created.
confirmNoOptional. When false or omitted, nothing is created: every item is validated by the broker and the response describes what would happen. Must be true to actually create. 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 create, 1 to 100 of them. Creating one topic is an array of length one. Duplicate topic names are refused before anything is created."New value: +"The topics to create, 1 to 1000 of them. Creating one topic is an array of length one. Duplicate topic names are refused before anything is created."
  2. First observedv0.2.0

TDQS

A4.5/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 it: confirm gating, non-atomic creation with partial failures that are not rolled back, refusal of existing topics and duplicates, broker defaults for omitted values, and the Kafka CREATE permission requirement. The irreversibility warning that partition counts cannot be reduced later is exactly the kind of consequence an agent must know before mutating.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and scope, then layered semantics (confirm gate, atomicity, ordering) in short declarative sentences. No filler sentences and no restatement of the title.

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 destructive-capable batch write with no annotations, the description covers gating, failure modes, permissions and parameter defaults, and an output schema exists to explain return values. Nothing an agent needs in order to invoke it correctly is missing.

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 100%, so the baseline is 3. The description adds some framing around the items array and confirming the whole batch, but it largely restates what the schema already documents for items, confirm, partitions and replication_factor.

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 and resource (create Kafka topics) with explicit batch scope of 1 to 1000 and per-item fields. The line 'Existing topics are refused rather than modified' cleanly separates it from alter_topic_config, add_partitions and delete_topic without the agent needing to infer.

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?

Gives concrete selection guidance: 'Creating one topic is an items array of length one', and confirm=false as a validate-only dry run versus confirm=true to actually create. It never names a sibling tool for adjacent needs (e.g. changing existing topic configs), so it stops short of explicit alternatives.

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