get_incident
Retrieve the full evidence for one recorded incident from a completed patrol to explain why a partition was auto-fixed or escalated and show what to review.
Instructions
Return the full evidence behind one incident from a patrol that has already run.
Use this after patrol_duckdb, patrol_files or run_demo, when you need to explain why a partition was
auto-fixed or escalated, or to show the user what to review. A patrol records at most one incident per
partition, so the folder plus the partition date identifies it. Do not call it before a patrol.
Behavior: read-only. It reads audit.jsonl in out_dir and changes nothing; no network calls, returns
immediately, and the result is one record of a few kilobytes. Fails with a readable error if the
folder has no audit.jsonl (run a patrol first) or no incident exists for that partition.
Returns one record with: partition, detectors (the problems found), decision, context (row counts and
amounts for the day and for each segment, next to the source's control totals), candidates (every fix
that was tried, with whether it kept the invariants and the residual gap it left) and chosen (the
best-supported candidate).
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": {
"out_dir": "<out_dir>",
"partition": "<partition>"
},
"name": "get_incident"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out_dir | Yes | The outputs.folder value returned by patrol_duckdb, patrol_files or run_demo. | |
| partition | Yes | Which incident: the partition date as YYYY-MM-DD, copied from an incident's 'partition' field, or 'table-level' for a problem with the whole table such as a schema change. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||