Search Apex Log Events
apexlog_search_eventsSearch Apex debug log events in log order by type, method, namespace, parent event, or text to inspect validation rules, statements, and debug output without a shell.
Instructions
Search the events of an Apex debug log in log order: what the code printed (USER_DEBUG), validation rules, statements, or every event under one method. For plain text in the saved .log, grep is cheaper; use this for event types, nesting, or without a shell. Text past 400 characters is elided; ask for one event by eventId to read up to 30,000.
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": {
"logFilePath": "<logFilePath>"
},
"name": "apexlog_search_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Only these log event types, e.g. USER_DEBUG, VALIDATION_RULE | |
| limit | No | Page size (default: 50) | |
| offset | No | Rows to skip (default: 0): the last page's nextOffset | |
| eventId | No | Only this event, with more of its text | |
| contains | No | Only events whose text holds this, ignoring case | |
| namespace | No | Only these namespaces | |
| logFilePath | Yes | Absolute path | |
| parentEventId | No | Only events below this one |