caveat_find
Search past decision records for whether a decision was already made, on what grounds, and whether it still stands by matching query words across decisions and evidence.
Instructions
Search past decision records of one program for decisions already made: has this been decided before, on what grounds, and does it still stand? Each record is the events of one past run, replayed in a fresh session. A decision revision is found when every word of query occurs, ignoring case, in its decision or revision name, the record name, the names, sources and claims of the evidence it rests on, its caveats, or its retention reasons. Use caveat_explain to see one record in full, and caveat_dependents to trace one evidence forward. report (caveat-find/0.1) includes words, searched (per record: revisions and any fatal event) and found (per revision: record, value, status, grounds with sources, retained caveats, withdrawn evidence, history, outcome and where each word matched). exitCode: 0 searched, even when nothing matched; 1 an event failed fatally in a record (its decisions are of the session before it); 2 source load failure. Returns the same JSON in structuredContent and text: {schema:"caveat-authoring/0.1",operation,sourceSha256,runtime,exitCode,report}. Read exitCode even when isError is false. Bridge failures instead set isError:true with {schema:"caveat-authoring-error/0.1",error:{kind,message}}.
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": {
"source": "<source>",
"records": "<records>",
"query": "<query>"
},
"name": "caveat_find"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Words to find, separated by spaces, such as "refund email". Every word must match; case is ignored; a word matches part of a name, so refund matches refund_warranted. | |
| source | Yes | Complete inline Caveat program text, available as the virtual file inline.cav. No file path or URL lookup. At most 1 MiB of UTF-8 source; each call uses a fresh runtime. | |
| records | Yes | Past records of the program, each {"name":"ticket-a","events":[...]}: a unique non-empty name the report uses, and the events of that run in order, as for caveat_explain. At most 64 records and 1 MiB of serialized UTF-8 JSON in all; each record at most 1,000 events. |