Skip to main content
Glama

delete_topic

Permanently remove 1 to 100 Kafka topics after previewing message loss; confirmation and data-loss acknowledgment are required to proceed.

Instructions

Delete 1 to 100 Kafka topics in one call through items. Deleting one topic is an items array of length one.

This is the most destructive tool here. Deleting a topic destroys every message in it, and Kafka has no undo: recreating the topic does not bring the data back. Any consumer group reading it breaks.

Nothing is deleted unless confirm is true; otherwise the response reports, per topic, how many messages would be destroyed, how many partitions it had, and which consumer groups had committed offsets for it. A topic that still holds messages also requires acknowledge_data_loss on its item, so destroying data is never a single unconsidered call.

One confirm covers the whole batch, and deletion is not atomic: topics deleted before a later item failed stay deleted. Results follow items order, each carrying index with result or error. Internal topics are refused. Requires Kafka DELETE permission.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesThe topics to delete, 1 to 100 of them. Deleting one topic is an array of length one. Naming the same topic twice is refused before anything is deleted.
confirmNoOptional. When false or omitted, nothing is deleted and the response describes what each deletion would destroy. Must be true to actually delete. One confirm covers the whole batch.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
atomicYes
failedYes
appliedYes
resultsYes
succeededYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/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 thoroughly: irreversibility ('no undo', recreating does not restore data), consumer-group breakage, confirm gating, per-topic preview output, non-atomic batch behavior, and DELETE permission requirement. This is exactly the behavioral disclosure a destructive tool needs.

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 the action and scope, then layers the destructive warning and the safety gates. Slightly verbose and some content duplicates the schema, but every sentence carries substantive information.

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 batch tool with no annotations and an output schema present, the description covers safety, permissions, failure modes, and batch semantics completely. Nothing an agent needs to call it safely 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 coverage is 100% and the schema already documents items, topic, acknowledge_data_loss, and confirm in detail, so the baseline is 3. The description largely restates schema semantics ('one confirm covers the whole batch', items ordering) rather than adding new meaning.

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 ('Delete 1 to 100 Kafka topics in one call through items') and immediately scopes the batch semantics. An agent can distinguish it from create_topic, delete_consumer_group, and delete_records without opening any schema.

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 strong usage context: preview-vs-delete via confirm, the acknowledge_data_loss gate, and refusal of internal topics. It does not name an alternative sibling tool for inspection (e.g. describe_topic), but the workflow guidance is clear and actionable.

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