caveat-lang
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Inline authoring operations only. Evidence and reports are supplied data; no file access or external permission is implied.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| caveat_validateA | Load inline source with the installed runtime and list its declarations. Start here to find load errors; use caveat_check for authoring diagnostics and caveat_test to verify expected behavior. No events are dispatched. report (caveat-validate/0.1) contains program, loads, events, reading_streams, decision_series and displayed bindings, or a load error. exitCode: 0 loaded; 2 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}}. |
| caveat_checkA | Load a single-file program and report authoring diagnostics, such as repeated rules or a missing reopening path. Use after editing source; choose caveat_validate for a declaration summary and caveat_test for behavior assertions. A clean check does not prove behavior; bundles are unsupported. report (caveat-check/0.1) contains loads, strict, diagnostics and suppressed diagnostics, with code, location, message and suggestion, or a load error. exitCode: 0 completed without a strict failure; 1 strict with unsuppressed diagnostics; 2 load failure or bundle. 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}}. |
| caveat_testA | Run scenario assertions and runtime invariant checks against inline source, with a fresh session per scenario. Use to verify expected event outcomes and snapshot values; caveat_validate only checks loading, caveat_check reports diagnostics, and caveat_explain inspects history without assertions. report (caveat-scenario-report/0.1) includes files, per-scenario results/failures, check diagnostics and passed/failed totals. exitCode: 0 all passed; 1 scenario failure; 2 invalid scenario document (report has valid:false and error) or blocking authoring diagnostics. Every source reference must be inline.cav. 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}}. |
| caveat_explainA | Replay optional events and explain the resulting decisions, evidence and displayed values. Use to answer why a decision was made; choose caveat_dependents to trace one evidence or caveat name forward, and caveat_test for assertions. report (caveat-explain/0.1) includes sequence, event outcomes, decisions with grounds and revision history, evidence with caveats, displayed values and available archive history. exitCode: 0 replay completed (may include rejected events); 1 fatal event with last good state; 2 source load failure (report has loads:false and error). 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}}. |
| caveat_dependentsA | Replay optional events and find what rests on one named evidence item, reading stream or caveat. Use for impact inspection; caveat_explain instead explains all decisions and their reasons. Subjects are causes only: evidence, a reading stream or a caveat. Claims and decisions are never subjects, because a claim causes nothing and the grounds of a decision are evidence, not claims; both appear in the report as what the subject reaches. To trace from a claim, query the evidence that supports or opposes it (report.claims lists those relations). report (caveat-dependents/0.1) includes subject, kind, sequence, event outcomes, claims, decisions, changes, values, displayed values and withdrawal records; dependency entries distinguish grounds from possible influence through lineage. exitCode: 0 replay completed (may include rejected events); 1 fatal event with last good state; 2 load failure or unknown subject, with report.error. 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}}. |
| caveat_dispatchA | Keep one running ledger across calls: send events to the program, starting fresh or from the save an earlier caveat_dispatch call returned, and get the new save back. Use when a task records decisions as it goes; pass report.save unchanged as save in the next call, with the same source, and send only the new events. The server keeps nothing between calls. caveat_explain instead replays a whole history from the start each time. report (caveat-dispatch-step/0.1) is the caveat-explain/0.1 report of the state after these events (its events list only this call's events), plus restored and save. exitCode: 0 completed (may include rejected events); 1 fatal event, with the explanation and save of the last good state; 2 source load failure, or a save that does not restore with this exact source (report has error). 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}}. |
| caveat_findA | 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}}. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool targets a distinct phase (validate, check, test, explain, dependents, find, dispatch), and descriptions explicitly cross-reference the others to steer selection. Minor overlap remains between load-oriented tools (validate vs. check) and replay-oriented tools (explain vs. dependents), but the guidance is strong enough for an agent to choose correctly.
All names use the caveat_ prefix with snake_case and mostly verb-style suffixes (validate, check, test, explain, find, dispatch). The noun form caveat_dependents is a small deviation from the otherwise consistent verb pattern.
Seven tools is well-scoped for a language authoring and runtime inspection server, covering validation, diagnostics, testing, explanation, impact tracing, search, and incremental dispatch. Each tool has a clear role without redundant padding.
The surface covers the key authoring lifecycle: load checks, diagnostics, assertions, stepwise runtime dispatch, explanation, dependency tracing, and searching past records. Minor gaps exist, such as no formatting tool or bundle support (explicitly noted as unsupported in check), but core workflows are workable.