servicebus_peek_messages_to_file
Peek non-destructively at messages in an Azure Service Bus queue, saving message bodies as JSON to a file to avoid filling the context window.
Instructions
Non-destructively peek at messages in an Azure Service Bus queue, saving bodies to a file.
Message bodies are written to output_file as JSON (keyed by sequence number). Only metadata (sequence number, enqueue time, properties) is returned in context — use this variant when message bodies may be large to avoid filling the context window. For session-enabled queues, provide a session_id to peek a specific session. If session_id is omitted on a session-enabled queue, the next available session is accepted, peeked, and immediately released.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | Yes | ||
| queue | Yes | ||
| output_file | Yes | ||
| max_count | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |