Skip to main content
Glama

compare_clusters

Compare Kafka cluster topics against another cluster to find topics missing on either side, topics that disagree, and broker counts—so you can spot drift between environments before creating anything.

Instructions

Compare the topics of 1 to 1000 other clusters against the one this endpoint serves, through items. Reports which topics only this cluster has, which only the other has, which exist on both but disagree, and how many brokers and topics each side has. Comparing one cluster is an items array of length one.

Use it to find what preproduction has that production does not, or to check whether two environments still match. Topics reported as only on the other cluster carry their partition count, replication factor and explicitly-set configs, so the report can be handed straight to create_topic.

This tool creates and changes nothing. To create the missing topics, pass them to create_topic, which previews them against the broker first.

Only configs a topic sets for itself are compared. Two clusters may carry different broker defaults, and comparing inherited values would report every topic as different. Internal topics are excluded unless include_internal is set.

Topic listings come from the client's metadata cache, so a topic created within the last few seconds may still be reported as missing. Repeat the comparison after a moment rather than creating it twice.

Input Schema

NameRequiredDescriptionDefault
itemsYesThe clusters to compare against, 1 to 1000 of them. Comparing one cluster is an array of length one. Results follow this order and an unreachable cluster is reported against its own item.

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 clusters to compare against, 1 to 100 of them. Comparing one cluster is an array of length one. Results follow this order and an unreachable cluster is reported against its own item."New value: +"The clusters to compare against, 1 to 1000 of them. Comparing one cluster is an array of length one. Results follow this order and an unreachable cluster is reported against its own item."
  2. First observedv0.2.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, yet the description covers the critical behavioral facts: it is non-mutating, only explicitly-set topic configs are compared (not inherited broker defaults), internal topics are excluded by default, and results come from the client metadata cache so recently created topics may appear missing. It even warns to repeat the comparison rather than double-create, which is exactly the kind of guidance an agent 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 core compare semantics and the report contents before details. It runs five paragraphs, and while most sentences carry information (cache staleness, config comparison rules), the create_topic hand-off and the cache caveat could be tightened.

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?

An output schema exists so return values need not be explained, and the description still summarizes the shape (which topics, partition count, RF, explicit configs). For a non-trivial multi-cluster comparison with no annotations, the description covers safety, staleness, filtering defaults, and follow-up actions with nothing material missing.

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 baseline is 3, but the description adds real meaning: a single comparison is an items array of length one, results follow item order, and an unreachable cluster is reported against its own item. The include_internal and search semantics are largely covered in the schema itself, so it sits just above baseline.

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 (compare), resource (topics/items across clusters), and scope (1 to 1000 other clusters against the one this endpoint serves). It explicitly enumerates what the report contains (only-here topics, only-there topics, disagreeing topics, broker/topic counts), which distinguishes it from siblings like describe_topic or list_topics.

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

Usage Guidelines5/5

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

Names concrete scenarios ('find what preproduction has that production does not', 'check whether two environments still match') and hands off the follow-up action explicitly: missing topics go to create_topic, which previews against the broker first. It also states the tool creates nothing and points to list_clusters for valid names.

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