Kaval
v0.8.2Verify the facts an agent's action depends on before it acts — ALLOW, REVIEW, or BLOCK.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
check
Verify the facts an action depends on BEFORE acting on it. Describe the action you are about to take (and any context you are relying on), or pass the specific claims, and Kaval re-checks each fact against the sources it watches — returning decision ALLOW, REVIEW, or BLOCK with a signed receipt. ALLOW: every material fact still holds on fresh evidence — proceed. REVIEW: something is unknown, mid-re-evaluation, or changed at low/medium materiality — REVIEW IS NEVER PERMISSION TO ACT; surface it to a human or re-research. BLOCK: a high/critical fact has changed, or a critical fact is unkno…
| Parameter | Type | Description |
|---|---|---|
action | string | what you are about to do, in plain language, e.g. 'Approve this claim at the 2026 in-network rate'. Kaval extracts the facts it depends on. |
as_of | string | RFC 3339 cutoff for what the action may rely on |
claims | array | check these facts directly instead of extracting them: plain sentences, or {subject, predicate, object, scope} objects (structured claims skip extraction entirely) |
context | string | what you already believe that bears on the action — the retrieved chunk, the cached field, the prior answer |
materiality | how much this action's correctness matters — drives whether a changed fact is REVIEW or BLOCK | |
max_wait_ms | integer | budget in ms for live research on facts that are stale or new. Over MCP this defaults to 45000 and cannot go higher, because a tool call is cancelled by the caller at 60s; the API's own default, for d… |
mode | string | 'standard' (default) may research anything stale or novel within max_wait_ms; 'fast' answers only from stored state and reports anything it does not know as unknown |
origin_urls | array | authoritative sources for this action, merged with whatever this workspace already watches |
get_receipt
Fetch the full signed receipt for a check you already ran, by the `receipt.id` that check returned. `check` gives you only the id, the signature, and when it was signed; this returns the document that was actually signed — every fact with its state and the evidence basis under it (source locator, content digest, fetch and publication time), the freshness failure if state could not be served, the decision-rule version, and the signing key id. Get it when you have to SHOW the work: attach it to a BLOCK you are escalating, hand it to a reviewer or auditor, or check the verdict offline — the d…
| Parameter | Type | Description |
|---|---|---|
receipt_id * | string | the `receipt.id` from the check you want the proof for |
prepare_contract_upload
Create a private PDF upload target. Upload the exact bytes to upload_url before you call ingest_contract with the returned upload id.
| Parameter | Type | Description |
|---|---|---|
filename * | string | |
sha256 * | string | lowercase SHA-256 digest of the exact PDF bytes |
size_bytes * | integer | |
content_type | string | |
idempotency_key | string | reuse the operation key returned by an ambiguous prior attempt; omit for a new operation |
ingest_contract
Queue a contract for extraction. Use canonical text, an approved HTTPS content URL, or an upload id from prepare_contract_upload.
| Parameter | Type | Description |
|---|---|---|
authority_status * | string | |
contract_family_key * | ||
document_type * | string | |
effective_from * | ||
effective_to * | ||
external_id * | string | |
source * | ||
supersedes_contract_id * | ||
title * | string | |
idempotency_key | string | reuse the operation key returned by an ambiguous prior attempt; omit for a new operation |
get_contract
Get contract processing status, candidate counts, and extraction issue state. Poll until the contract is ready for review or has failed.
| Parameter | Type | Description |
|---|---|---|
contract_id * | string |
list_contract_claims
List extracted claim candidates with exact evidence spans. A reviewer must approve, correct, or reject each candidate before activation.
| Parameter | Type | Description |
|---|---|---|
contract_id * | string | |
activation_state | string | |
cursor | string | |
limit | integer | |
status | string |
list_contract_extraction_issues
List deterministic contract extraction failures for customer review. Each issue identifies the rejected candidate and evidence-line range without exposing contract text.
| Parameter | Type | Description |
|---|---|---|
contract_id * | string | |
cursor | string | |
issue_code | string | |
limit | integer |
review_contract_claim
Record an immutable human review. Use correct only with corrected_claim. The expected version prevents a stale review from overwriting newer work.
| Parameter | Type | Description |
|---|---|---|
claim_id * | ||
contract_id * | string | |
decision * | string | |
expected_candidate_version * | integer | |
review_id * | string | |
corrected_claim | object | |
idempotency_key | string | reuse the operation key returned by an ambiguous prior attempt; omit for a new operation |
reason | string |
import_facts
Queue 1 through 400 reviewed facts for warm checks. This tool does not create watched sources. Each item gets a terminal result.
| Parameter | Type | Description |
|---|---|---|
external_batch_id * | string | |
items * | array | |
idempotency_key | string | reuse the operation key returned by an ambiguous prior attempt; omit for a new operation |
get_fact_import
Get one bulk import and every item result. Poll until the batch reaches a terminal state.
| Parameter | Type | Description |
|---|---|---|
import_id * | string |
list_bulletins
List structured payer bulletins. Filter by payer, policy, code, publisher date, or review status. Dates are publisher-stated dates only. Prefer create_extraction_schema + create_extraction_run (or update_source's extraction_schema_id binding) for new integrations — this free-text pipeline still works but is not receiving new record types.
| Parameter | Type | Description |
|---|---|---|
code | string | |
cursor | string | |
limit | integer | |
payer_id | string | |
policy_number | string | |
published_from | string | |
published_to | ||
record_status | string | |
source_id | string |
get_bulletin
Get one structured bulletin by source-version id. Each field includes its status and exact evidence when available. Prefer get_extraction_run for new integrations — this free-text pipeline still works but is not receiving new record types.
| Parameter | Type | Description |
|---|---|---|
source_version_id * | string |
list_bulletin_extraction_attempts
List customer-readable bulletin extraction status. Filter by source or lifecycle state. This tool cannot requeue work. Prefer list_extraction_runs for new integrations — this free-text pipeline still works but is not receiving new record types.
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
limit | integer | |
source_id | string | |
status | string |
get_bulletin_extraction_attempt
Get one customer-readable bulletin extraction attempt by source-version id. This tool cannot requeue work. Prefer get_extraction_run for new integrations — this free-text pipeline still works but is not receiving new record types.
| Parameter | Type | Description |
|---|---|---|
source_version_id * | string |
list_training_jobs
List training and evaluation job status. This read-only tool does not start, approve, or promote a model.
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
demo_only | boolean | |
limit | integer | |
status | string |
get_training_job
Get one training job status. Production promotion remains an internal operation and is not available through MCP.
| Parameter | Type | Description |
|---|---|---|
job_id * | string |
list_training_feedback
List reviewed feedback and its effective training-use state. This read requires training:manage and does not approve data for training.
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
effective_training_use | string | |
limit | integer |
record_training_feedback_consent
Record an explicit, auditable training-use decision for one reviewed feedback item. This mutation requires training:manage. Approval requires consent_to_training=true.
| Parameter | Type | Description |
|---|---|---|
consent_to_training * | boolean | |
feedback_id * | string | |
training_use * | string | |
idempotency_key | string | reuse the operation key returned by an ambiguous prior attempt; omit for a new operation |
reason |
create_extraction_schema
Register a JSON Schema Kaval extracts structured records against. Bind the returned schema's id to a source with update_source so every document that lands on it afterward is extracted automatically and delivered as an extraction.document webhook, or pass it directly to create_extraction_run for a one-off publisher + period run. This is the schema-bound successor to list_bulletins' free-text extraction. Requires policy-update:manage.
| Parameter | Type | Description |
|---|---|---|
json_schema * | object | the JSON Schema records must satisfy, e.g. {type:'object', properties:{cpt_code:{type:'string'}}, required:['cpt_code']} |
name * | string | |
idempotency_key | string | reuse the operation key returned by an ambiguous prior attempt; omit for a new operation |
rename_extraction_schema
Rename a schema without changing its definition or hash. Active watched sources can continue to use it.
| Parameter | Type | Description |
|---|---|---|
id * | string | The extraction schema ID. |
name * | string | The new display name. |
delete_extraction_schema
Delete a schema from lists and selectors. Historical extraction records remain available. Returns a conflict if an active watched source uses it.
| Parameter | Type | Description |
|---|---|---|
id * | string | The extraction schema ID to delete. |
list_extraction_schemas
List the extraction schemas registered in this workspace, newest first.
create_extraction_run
Request a one-off publisher + period extraction run. Pass source_id or extraction_schema_id, not both; omit both when exactly one schema is bound in the workspace. Requires policy-update:manage. Answers with the run in status 'processing' — poll get_extraction_run or wait for its extraction.document webhook.
| Parameter | Type | Description |
|---|---|---|
period * | string | the YYYY-MM period to extract |
publisher_id * | string | org publisher UUID (from list_publishers / create_publisher) |
extraction_schema_id | explicit schema override; do not pass together with source_id | |
idempotency_key | string | reuse the operation key returned by an ambiguous prior attempt; omit for a new operation |
source_id | string | watched source whose bound schema should drive this publisher-period run |
get_extraction_run
Get one extraction run (an Update) by id — its status (processing | retry | succeeded | review_required | failed | out_of_scope), the schema it ran against, and its extracted result once it succeeds. Document PDF chrome (pdf_href, content_href, sections) is nested on extraction_run.document by default; pass expand_document=false to omit. Records and nested evidence live on extraction_run.result.
| Parameter | Type | Description |
|---|---|---|
run_id * | string | |
expand_document | boolean | nested document chrome on the run; defaults to true. Pass false to omit. |
list_extraction_runs
List extraction runs (Updates). Filter by publisher_id (org publisher UUID), optional period_from and/or period_to (YYYY-MM), created_since/updated_since (ISO-8601), and page with limit + cursor. Document chrome is nested on each run.document by default; pass expand_document=false to omit. Returns { extraction_runs, next_cursor }. Prefer webhooks for steady state; use this to catch up. Sources: list_sources / get_source_version_content.
| Parameter | Type | Description |
|---|---|---|
created_since | string | |
cursor | string | |
expand_document | boolean | nested document chrome on each run; defaults to true. Pass false to omit. |
limit | integer | |
period_from | string | |
period_to | ||
publisher_id | string | |
updated_since | string |
list_extraction_packages
List the monthly PDF + manifest rollups every publisher/period's extraction runs are packaged into, optionally filtered by publisher UUID and/or YYYY-MM period. Each row's pdf_href is GET /v1/extraction-packages/{id}/document — follow the 302 to a short-lived signed PDF (this tool does not download bytes).
| Parameter | Type | Description |
|---|---|---|
period | string | |
publisher_id | string |
list_publishers
List org-owned publishers for this workspace's billing account. publisher_id on sources and extraction runs is the UUID returned here; rename the display name without changing identity. Create with create_publisher.
create_publisher
Create an org-owned publisher (renameable display name; UUID is the identity). Pass the returned id as publisher_id to add_source. Duplicate names in the same org return 409.
| Parameter | Type | Description |
|---|---|---|
name * | string | display name, e.g. 'Aetna' |
idempotency_key | string | reuse the operation key returned by an ambiguous prior attempt; omit for a new operation |
get_publisher
Get one org-owned publisher by UUID. Display name is renameable; identity is the UUID used as publisher_id on sources and extraction runs.
| Parameter | Type | Description |
|---|---|---|
publisher_id * | string |
update_publisher
Rename an org-owned publisher. The UUID identity is unchanged — existing sources and runs keep grouping under it.
| Parameter | Type | Description |
|---|---|---|
name * | string | new display name |
publisher_id * | string |
add_source
Tell Kaval what to watch, so later checks are answered from fresh state instead of live research. Requires publisher_id (org publisher UUID from list_publishers / create_publisher) so extractions group under that publisher. Registering the NAME of an authority is usually enough: {kind:'entity', name:'Aetna', intent:'payer policy bulletins', publisher_id:'…'} resolves to the pages that publish it and watches them. Use kind:'url' for a specific page, kind:'push' for a document your own system will send in. Kaval polls watched sources adaptively, re-evaluates the facts that depend on them when…
| Parameter | Type | Description |
|---|---|---|
kind * | string | url (a specific page) | entity (a name to resolve) | push (a document you will send to Kaval) | connection (a configured system of record) |
publisher_id * | string | org publisher UUID from list_publishers / create_publisher — required; runs and monthly packages group by it |
intent | string | what you want watched about it, e.g. 'prior-authorization policy bulletins'. Drives entity resolution. |
label | string | |
locator | string | the URL, connection id, or push locator |
name | string | for kind:'entity', the plain name of the authority, e.g. 'Aetna' — the same field as locator, spelled for readability |
poll_interval_s | integer | starting poll interval; Kaval adapts it — slower when nothing changes, faster when it does |
scope_keys | array | tags that route document changes to the facts they can affect, e.g. ['plan:HMO','state:CA'] |
list_sources
List what Kaval currently watches for this workspace — including sources it auto-registered after a check cited them. Each row shows the locator, what it was registered for, when it was last successfully fetched, and whether it is active. Use it to see whether the fact you care about is actually backed by a watched source (and therefore fast and monitored) before relying on a check being warm.
| Parameter | Type | Description |
|---|---|---|
include_inactive | boolean | also return paused sources (default false) |
remove_source
Stop watching a source and forget it, by the `id` `add_source` or `list_sources` returned. Removal is the only thing that frees a slot. Capacity is two ceilings: up to 200 active registered/resolved sources per workspace (every URL a check cites auto-registers against that ceiling), and up to 200 active discovered children per parent (those do not consume the workspace registered/resolved budget). Pausing does not free either. An agent that only ever adds eventually fills the workspace ceiling — after which new citations are silently dropped and checks that used to be warm go back to researc…
| Parameter | Type | Description |
|---|---|---|
id * | string | the watched-source id returned by add_source (`source.id`) or list_sources |
update_source
Bind (or unbind) an extraction schema and/or set publisher_id on a watched source, by the `id` add_source or list_sources returned. Provide extraction_schema_id and/or publisher_id. Once a schema is bound, every document that lands on the source is extracted automatically and delivered as an extraction.document webhook. Pass extraction_schema_id: null to unbind. Pass reprocess: true to also fill-missing re-extract versions (webhook source_change is schema_changed; join on source_version_id) — also regroups under a newly set publisher_id. Requires policy-update:manage.
| Parameter | Type | Description |
|---|---|---|
id * | string | the watched-source id returned by add_source (`source.id`) or list_sources |
extraction_schema_id | the extraction schema to bind, or null to unbind and stop automatic extraction | |
publisher_id | string | org publisher UUID from list_publishers / create_publisher; future runs use this identity |
reprocess | boolean | when true, also re-extract versions that already ran under another schema/publisher; default false. Invalid with extraction_schema_id null. |
get_source_version_content
Fetch the captured content of one fetched version of a watched source, by the `source_version_id` an extraction.document webhook or an extraction run names. Defaults to the raw canonical text; pass format:'sections' to get it pre-split into the same sections the sectionizer feeds extraction runs.
| Parameter | Type | Description |
|---|---|---|
source_version_id * | string | |
format | string |
report_outcome
Report what actually happened after a prior check, using the receipt id it returned, so Kaval can calibrate. Use `relied_and_correct` when you acted on an ALLOW and it held; `current_later_contradicted` when an ALLOW turned out to be wrong; `stale_caught_real` when a REVIEW/BLOCK caught a genuine change; `stale_was_false_alarm` when it did not.
| Parameter | Type | Description |
|---|---|---|
id * | string | the `receipt.id` returned by the check you are labelling |
kind * | string | |
note | string |
verify
DEPRECATED — prefer the `check` tool. Verifies one load-bearing conclusion against evidence references you supply and returns a signed ProofPacket receipt (status valid | invalidated | could_not_verify, receipt.decision ALLOW | REVIEW | BLOCK). Kept only for existing pilot integrations that pass explicit evidence_refs; it will be removed. New calls should use `check`, which needs no evidence list, is answered from watched state with no model call and no fetch, and keeps monitoring the facts afterwards.
| Parameter | Type | Description |
|---|---|---|
conclusion * | string | the exact assertable proposition the downstream workflow intends to rely on — a STATEMENT of what you believe, in the indicative. The API rejects anything phrased as a request or a question, INCLUDI… |
evidence_refs * | array | 1-20 evidence references the conclusion relies on: plain http(s) URL strings, or { url, document_id } objects with unique document_id values |
as_of | string | RFC 3339 cutoff for what the conclusion may rely on |
context | string | |
idempotency_key | string | reuse the operation key returned by an ambiguous prior attempt; omit for a new operation |
intended_action | string | |
jurisdiction | string | |
materiality | string | |
reversibility | string |