Skip to main content
Glama

copy_message

Copies up to 500 Kafka messages by topic, partition, and offset to an existing topic or cluster, preserving key, value, and headers plus provenance headers.

Instructions

Copy 1 to 500 existing messages in one call through items, each identified by topic, partition and offset, to an existing topic on this or another configured cluster. Preserves key, value and headers and adds traceable provenance headers. Copying one message is an items array of length one.

No message is written unless confirm is true; one confirm covers the whole batch, and writing is not atomic because Kafka cannot retract a record produced before a later item failed. Results follow items order, each carrying index with result or error.

The destination must be writable and requires Kafka write permission; a read-only cluster may still be the source.

A key or value carrying a Schema Registry id is copied byte for byte. When the destination cluster uses a different registry the id may mean nothing there, so the response warns; set translate_schema to register the schema in the destination registry and rewrite the id.

Input Schema

NameRequiredDescriptionDefault
itemsYesThe copies to make, 1 to 500 of them. Copying one message is an array of length one. Two items naming the same source and destination are refused before anything is written.
confirmNoOptional. When false or omitted, nothing is written and the response shows the messages that would be copied. Must be true to actually write them. One confirm covers the whole batch.

Output Schema

NameRequiredDescriptionDefault
atomicYes
failedYes
appliedYes
resultsYes
succeededYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.7
    • changedInput schema / properties / items / description
      Previous value: -"The copies to make, 1 to 20 of them. Copying one message is an array of length one. Two items naming the same source and destination are refused before anything is written."New value: +"The copies to make, 1 to 500 of them. Copying one message is an array of length one. Two items naming the same source and destination are refused before anything is written."
    • changedOutput schema / properties / results / items / properties / result / required
      Previous value: -[
      -  "source_cluster",
      -  "destination_cluster",
      -  "source_topic",
      -  "source_partition",
      -  "source_offset",
      -  "destination_topic",
      -  "message",
      -  "applied"
      -]New value: +[
      +  "source_cluster",
      +  "destination_cluster",
      +  "source_topic",
      +  "source_partition",
      +  "source_offset",
      +  "destination_topic",
      +  "message",
      +  "applied",
      +  "written_partition",
      +  "written_offset"
      +]
  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 well: it discloses the non-atomic batch write behavior, that confirm gates all writes, result ordering, index/error reporting, permission requirements, read-only source allowance, and schema-ID translation implications.

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?

The description is front-loaded with the core operation and organized into short paragraphs covering batch behavior, confirmation, permissions, and schema handling. It is appropriately sized for a complex batch-copy tool, though it repeats the single-message case already covered by the items schema description.

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?

Given the batch complexity, cross-cluster behavior, confirmation gate, and schema registry nuances, the description is complete enough for an agent to invoke it correctly. An output schema exists, so return-value details need not be explained further.

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 parameter schema already documents fields in detail. The description still adds useful semantics beyond the schema, especially that one confirm covers the whole batch, that duplicate source/destination pairs are refused up front, and how translate_schema affects registry writes and ID rewriting.

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?

The description opens with a precise verb and resource: copy 1 to 500 existing messages, identified by topic/partition/offset, to an existing topic. It distinguishes itself from read or produce siblings by emphasizing existing-message copying, provenance headers, and optional cross-cluster destination.

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?

It clearly establishes usage context: batch copying, how to copy a single message, the confirm requirement, and destination/source permission constraints. It does not explicitly name alternatives such as get_message, produce_message, or transform_messages, nor state when not to use it.

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