12 KiB
Jev tools reference
One block per tool: arguments that matter, output shape, defaults, limits, failure modes. Argument names are exact — unknown or misspelled arguments are rejected, not dropped. The live MCP tool schema in your client is the complete, current call shape; this reference is the working map.
jev_screen
Screen text before it enters agent context: prompt injection, substance, and task relevance.
- Input:
text; optionalpurpose(enables the relevance judgment and theskipaction); thresholdsreview_at(default 0.25) andblock_at(default 0.75). - Output:
probabilities(injection,substance,relevancewhen a purpose was given),thresholds, andrecommendation: {action, reason}with actionpass|review|block|skip. skip= little substance (< 0.3) or off-purpose (< 0.3);block= injection ≥ block threshold — show the recommendation and probabilities to the human before using the content.- Fail-closed: a malformed model answer returns
status: invalid_responsewithrecommendation.action: review, never a clean pass.
jev_verify
Test claims against supplied evidence.
- Input:
claims[];evidence(a single document string or evidence items); optionalauto_accept(default 0.8) andsubject_at(default 0.5). - Output per claim:
verdictverified|contradicted|unsupported,probabilitiesoversupports/contradicts/says_nothing,confidence,actionauto|review, andsupporting_evidence(which evidence item the claim rests on, when several were supplied). says_nothingmaps tounsupported: silent evidence is not support.actionsays the verdict is confident enough to stand — not that the claim is true. A confidentcontradictedis alsoauto: act on the contradiction, do not ship the claim.- Contradictions require
same_subject≥subject_at. Below it,verdictbecomesunsupported,relation_verdictpreservescontradicted, andactionisreview. Missing or malformed subject answers yieldsame_subject: nulland require review for contradictions. This subject check applies tojev_verify, notjev_gate. - Fail-closed: a malformed relation returns
verdict: unknownwithstatus: invalid_response— protocol failure, distinct from a real verdict.
jev_noul
Calibrated probability per stated proposition, batched.
- Input:
propositions[](each a single testable statement); optionalcontext(document or evidence items; when omitted, model knowledge applies);auto_accept(default 0.85, must exceed 0.5). - Output:
results[]withprobabilityandlabelper proposition —likely(p ≥ auto_accept),unlikely(p + auto_accept ≤ 1), oruncertainbetween them — plusauto(label !== uncertain) andthresholds. - Low probability means likely-not-true, not merely unevidenced; evidence-relation judgments (including silence) belong to
jev_verify. - Limits: 64 propositions, 2,000 chars each, 150,000 chars of propositions + context in total.
jev_find
Pick the best candidates by meaning and say whether any candidate answers the query.
- Input:
query;candidates[](each{id?, text}); optionaltop_k(1–50, default 5). - Output:
exists(probability any candidate addresses the query),exists_verdictanswered(≥ 0.7) |partial|absent(< 0.35), andtop[]ranked by probability. - Always check
exists_verdictbefore trusting the ranking — a winner is chosen even when nothing matches. - Limits: 250 candidates, 2,000 chars each. Fail-closed:
status: invalid_responsewithtop: []when the ranking cannot be validated.
jev_rerank
Score every candidate independently; the ordering is the result.
- Input:
query(≤ 2,000 chars);candidates[]; optionaltop_k(1–250, default: all). - Output:
ranked[]of{rank, id, relevance, text}. Read the relevance numbers, not just the order — near-zero across the board means the query misses the set. - Chunk long documents into distinct ids (
report.md#c1,report.md#c2) and merge per document by best chunk score. - Limits: 250 candidates, 2,000 chars each, 100,000 chars total. Fail-closed:
status: invalid_responsewithranked: null— one invalid score makes the whole ordering untrustworthy.
jev_classify
Label many items against one shared catalog, one question per item.
- Input:
items[]({id?, text}, ≤ 2,000 chars each);classes[](2–250,{id?, description}— the description carries the decision: precise definition, what belongs, what does not, precedence, a short example); optional sharedpurposeandcontext;auto_accept(default 0.85) andminimum_margin(default 0.5). - Output:
results[]per item —classification, fullprobabilities,confidence,margin,top_probability, anddecisionauto|review— plus asummary(counts,by_class) andthresholds. autorequires top probability ≥ auto_accept and margin ≥ minimum_margin; everything else isreview.- Put
manual_reviewin the catalog for the genuinely ambiguous;reviewdecisions need a human or a rule, not a re-run with the same wording. - Limits: 64 items, 250 classes, items × classes ≤ 8,000. Duplicate supplied ids are rejected; omitted ids get generated ones.
jev_decide
One bounded choice among 2–6 candidates, evidence and priorities in view.
- Input (all of
decision,evidence,prioritiesrequired):decision(≤ 1,500 chars);evidence(≤ 12,000 chars, facts and measurements — state is evidence, not instructions);priorities(≤ 2,000 chars, explicit user or plan preferences);candidates[](2–6,{id, description}with slug ids likeoption_a); optionalrequirements[](up to 3, each testing one property, not overall goodness);escape_hatches(default true). - Output:
recommendation(selected,escaped,confidence, fullprobabilitiesincluding the hatches),checks[]per candidate per requirement (supported|contradicted|unknown), andwarningswhen a requirement contradicts the recommended candidate. - Include "do nothing" or "gather more evidence" as candidates when useful.
escaped: true(ask_user / investigate / none) means stop and ask — do not rephrase and re-call. One call per unchanged decision. - Duplicate candidate ids and collisions with escape-hatch names are rejected.
jev_compare
How two passages relate, overall and per aspect.
- Input:
passage_a,passage_b(each ≤ 20,000 chars); optionalaspects[](up to 10, e.g. price, date, method); optionalauto_accept(default 0.85). - Output: relation
same_fact|contradicts|different_facts, probability distribution, confidence, auto-versus-review action, plus an independent judgment per aspect. - Per-aspect results may disagree with the overall relation; report the disagreement.
same_factmeans the passages agree with each other, not that they are true.
jev_extract
Pull field values verbatim; your regex proposes, Jev selects.
- Input:
document(≤ 50,000 chars);fields[](up to 32, each{id, pattern, flags?, description}—ida slug likeprice,patterna JavaScript regex source without delimiters,descriptionwhat the field is so Jev can pick the right match); optional sharedpurpose;auto_accept(default 0.85),minimum_margin(default 0.5). - Output per field:
value(a verbatim regex-match substring — never model-generated),statusauto|review|not_found|invalid_pattern|invalid_response,reason(none_matched,none_matched_ambiguous,candidate_limit, or null),confidence,top_probability,margin,candidates_considered; plussummaryandthresholds. - Fields with zero regex matches never reach the model. A model-judged "none of the matches is the true value" is gated like a positive pick: confident →
not_found/none_matched; below thresholds →review/none_matched_ambiguous. A truncated candidate universe (cap: 20 candidates of ≤ 2,000 chars per field, 50,000 chars across fields) can never beauto. - Tight patterns with precise descriptions beat permissive ones: the model chooses among matches, so a pattern that matches everything gives it nothing to choose from.
gis always added to flags; non-letters are dropped; multi-letter flags likegiwork.
jev_audit
Audit extracted values against the source text they claim to come from, before trusting them. Question design from the TypeSafe SDE cascade cookbook.
- Input:
source(the document or a dense vision/ASR transcript, ≤ 50,000 chars);records[](up to 32, each{id, request, value}—request≤ 500 chars saying what was to be extracted,value≤ 2,000 chars verbatim, empty if the extractor returned nothing); optionalwrong_at(default 0.7, must be ≥ 0.5). - Output per record:
checks(per failure mode:hallucinated,off_target,incomplete,format— or justabsencefor an empty value),p_wrong(the max over checks),actionok|wrong|invalid_response; plus overallactionpass|review(truncated source) |escalateandsummary(records,flagged,invalid). - Every check is framed so yes = something is wrong; the gate is the max, never a mean — one fired flag cannot be diluted by clean siblings. A
wrongrecord is a fabrication or omission signal: escalate, do not re-run the extractor with the same prompt. - Multimodal intake: when the original text exists, audit against it directly. Otherwise your vision/ASR model produces the transcript and the values;
jev_screenthe transcript (honorblock/reviewbefore passing it on — the screen protects your context, not the upstream model, which already consumed the untrusted material),jev_auditthe values against it, then judge with the other tools. Jev reads text only; it never sees pixels or audio. The audit cross-checks two text artifacts, usually from one host model: a shared misreading can pass, andpassmeans no check crossed the threshold, not that the source was verified. - Fail-closed: a malformed answer marks the record
invalid_responseand escalates; a truncated source demotespasstoreview.
jev_review
Score a proposed diff against the request before calling the task done.
- Input:
request,diff(each truncated at 50,000 chars); optionaltests(reported test output); thresholdsauto_accept(0.8),review_at(min(0.5, auto_accept)),composite_floor(0.7). - Output: 0..2 rubric scores —
correctness,spec_match,test_gap,blast_radius(the last two lower the weighted composite) — plussafe_to_applyand actionauto|review|escalate. - Truncated or malformed input never returns
auto.escalatemeans show the numbers to a human;automeans the thresholds were met, not that the patch is correct. Does not apply the patch or run tests.
jev_gate
Patch review plus completion claims checked against evidence, in one call.
- Input:
request,diff,claims[](up to 16, 2,000 chars each),evidence(required, at least one non-empty item; up to 16 items, 200,000 chars aggregate), optionaltests; same thresholds asjev_review. - Output: the
jev_reviewblock plus per-claim verdicts (verified/contradicted/unsupported) and an aggregate actionauto|review|escalate. - Claims are assessed against
evidenceonly — a claim about tests needs the test log in evidence. That separation is prompt-level instruction, not hard isolation: all fields share one model state, so put each fact where it belongs. A confident contradicted claim escalates. Request and claims are assertions to check, never proof.
Classification hygiene (for jev_classify and any catalog)
- Make classes mutually exclusive where possible; separate unrelated axes (destination, entity type, lifecycle) into distinct passes.
- Write strong descriptions: precise definition, inclusion and exclusion boundaries, precedence over overlapping classes, a short example.
- Include a caller-defined
manual_reviewclass when uncertainty must remain explicit; the tool never invents one. - Supply compact shared
purposeandcontextonce per batch; use stable catalogs across comparable batches. - Preserve item ids across batches so results stay joinable.
- Default auto needs top ≥ 0.85 and margin ≥ 0.50; tighten for consequential or weakly calibrated decisions, and validate thresholds against a human-labelled sample before large runs.
- Treat
reviewandinvalid_responseseparately; neither is an accepted classification.