audit_query
Search the append-only audit log with optional filters to review compliance, debug events, or verify permission grants.
Instructions
Search the append-only audit log with optional filters. Read-only — never modifies the log. Returns {ok:true, entries:[{timestamp, agentId, eventType, outcome, details}], count}. Returns {ok:false, error:"..."} if the log file cannot be read. All filters are optional and combinable; use limit to cap results and avoid large payloads on busy systems (default 100). Use audit_tail for the most recent N entries without filtering; use this tool for compliance review, debugging, or verifying permission grant history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id_filter | No | Filter entries by this agent ID (optional) | |
| event_type_filter | No | Filter by event type (optional) | |
| outcome_filter | No | Filter by outcome: success, failure, denied (optional) | |
| since_iso | No | ISO 8601 timestamp — return entries at or after this time (optional) | |
| limit | No | Maximum number of entries to return (default: 100) |