Skip to main content
Glama

get_message

Read 1–500 Kafka messages at exact topic, partition and offset addresses in one call, with optional surrounding context; schema-encoded values are decoded to JSON.

Instructions

Read 1 to 500 Kafka messages at exact addresses in one call through items, and optionally nearby messages for context. Returns key, value, headers, timestamp and original value size.

Values carrying a Schema Registry id (Avro, Protobuf, JSON Schema) and topics with a configured format are decoded to JSON; format, schema_id and message_type say what the bytes were. Anything else is returned as text, or base64 when it is binary, and decode_error explains a value that named a schema but could not be decoded.

Results follow items order, each carrying index with result or error, so an invalid partition or an offset beyond the partition end is reported against its own item rather than failing the call. Reading one message is an items array of length one.

Input Schema

NameRequiredDescriptionDefault
itemsYesThe message addresses to read, 1 to 500 of them. Reading one message is an array of length one. Results follow this order and an address that cannot be read is reported against its own item.

Output Schema

NameRequiredDescriptionDefault
atomicYes
failedYes
appliedYes
resultsYes
succeededYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.7
    • changedInput schema / properties / items / description
      Previous value: -"The message addresses to read, 1 to 20 of them. Reading one message is an array of length one. Results follow this order and an address that cannot be read is reported against its own item."New value: +"The message addresses to read, 1 to 500 of them. Reading one message is an array of length one. Results follow this order and an address that cannot be read is reported against its own item."
    • changedInput schema / properties / items / items / properties / context / description
      Previous value: -"Optional number of messages to also return either side of this offset. Defaults to 0. Clamped to what the partition holds."New value: +"Optional number of messages to also return either side of this offset. Defaults to 0, at most 100. Clamped to what the partition holds."
    • changedInput schema / properties / items / items / properties / max_value_bytes / description
      Previous value: -"Optional maximum number of value bytes to return per message. Defaults to 4096. Values longer than this are cut and flagged with truncated=true."New value: +"Optional maximum number of value bytes to return per message. Defaults to 4096, at most 1048576. Values longer than this are cut and flagged with truncated=true."
  2. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/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 well: it discloses the decoding pipeline (Schema Registry ids, configured topic formats, format/schema_id/message_type fields), the text/base64 fallback for undecoded bytes, decode_error, truncation via max_value_bytes, and per-item error isolation so one bad address doesn't fail the call. It omits permission/auth requirements and any rate or cost characteristics, which keeps it off a 5.

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 action and payload, then organized into addressing, decoding, and error-order paragraphs. It is four paragraphs long but nearly every sentence contributes new information (decoding rules, binary fallback, per-item error semantics); only the closing 'items array of length one' sentence is close to redundant with the schema.

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

Completeness4/5

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

An output schema exists, so the description doesn't have to explain return shape, yet it usefully flags the envelope fields and decode metadata that matter for interpreting results. Combined with 100% schema coverage and detailed error-isolation behaviour, an agent has what it needs; only permissions and any preconditions for reading a topic are unaddressed.

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% and every nested field (topic, partition, offset, context, max_value_bytes) has its own description, so the baseline is 3. The description adds meaning about result ordering and index-keyed error reporting for items, but it doesn't restate the 1-500 bound or detail how context interacts with max_value_bytes beyond what the schema already says.

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

Purpose4/5

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

Opens with a specific verb and resource ('Read 1 to 500 Kafka messages at exact addresses ... through items') and pins the scope to exact partition/offset addressing plus optional context neighbours. It implicitly contrasts with sample_messages/search_messages by stressing 'exact addresses', but never names those siblings, so an agent must infer the distinction.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: 'at exact addresses' implies you already know the offset, and 'Reading one message is an items array of length one' covers the singleton case. There is no explicit 'use this instead of search_messages when you already have offsets' or prerequisite about discovering offsets first.

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