get_event_attachment
Read text attachment contents from self-hosted Sentry events and logs; binary files return metadata only. Filter large logs via regex to get matching lines with context.
Instructions
Read the contents of a text attachment (e.g. a log file) on an event. Binary attachments such as minidumps are not returned; their metadata is. Use grep_pattern to return only matching lines from large logs.
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": {
"project_slug": "<project_slug>",
"event_id": "<event_id>",
"attachment_id": "<attachment_id>"
},
"name": "get_event_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_id | Yes | Event ID the attachment belongs to (event_id from list_event_attachments). | |
| max_chars | No | Max characters of content returned (1-100000, default: 20000). | |
| grep_pattern | No | Regex (case-insensitive): return only matching lines with context. | |
| project_slug | Yes | Project slug. | |
| attachment_id | Yes | Attachment ID (id from list_event_attachments). |