servicebus_peek_messages_to_file
Peek messages from an Azure Service Bus queue non-destructively and save large message bodies to a JSON file, keeping only metadata in the response to prevent context overflow.
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.
connection_string_env_var: name of the environment variable holding the Service Bus connection string. If the variable is set, connection-string auth is used; otherwise DefaultAzureCredential is used.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | Yes | ||
| queue | Yes | ||
| output_file | Yes | ||
| max_count | No | ||
| session_id | No | ||
| connection_string_env_var | No | AZURE_SERVICEBUS_CONNECTION_STRING |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |