What an answer looks like
Every tool returns the same envelope. The corpus state travels with it, and a passage carries its exact place in the document.
{
"result": [{
"document_id": "saos:205994",
"source": "saos",
"source_url": "https://...",
"snippet": "...",
"citation_locator": {
"document_id": "saos:205994",
"offset_start": 4128, "offset_end": 4402
},
"provenance": [{ "document_id": "saos:205994", "source": "saos" }]
}],
"jurisdiction": "pl",
"snapshot": "pl-2026-08",
"coverage_status": "ok"
}
Field names and shapes are the contract; values here are illustrative.
A missing result is named
An empty list is never passed off as an honest zero.
| ok | the whole corpus answered |
| partial | part of the corpus did not respond; results come back with a note and the failed parts named |
| search_unavailable | nothing responded; result is null, not an empty list |
| out_of_corpus | a citation that stays in the answer, with the reason it could not be resolved |
Six tools, over MCP and REST
search_law · get_document · get_citations · trace_eu_origin · trace_history · what_is_missing
Parameters, limits and the full response contract: github.com/matematicsolutions/repertorium.