search_messages
Search Kafka messages for a substring in key or value, with options to limit results and scan from a specific offset or timestamp.
Instructions
Find messages whose key or value contains the given text.
Matching runs server-side in the Console's sandboxed JavaScript interpreter, so only matching messages are transferred. Scanning starts from the oldest message by default; narrow the range with start_offset or start_timestamp_ms on high-volume topics.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic": "<topic>",
"text": "<text>"
},
"name": "search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Substring to find. | |
| topic | Yes | Kafka topic name. | |
| max_results | No | ||
| partition_id | No | Partition to read from, or -1 for all partitions. | |
| start_offset | No | Where to start scanning: -1 recent, -2 oldest (default), -3 newest/live, or an explicit offset. | |
| case_sensitive | No | ||
| start_timestamp_ms | No | Scan from this time instead of an offset. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |