Judge one agent output (pass, fail or retry)
judgeA pass/fail/retry verdict on ONE agent output, from a service outside your agent, used as the go/no-go before an agent spends money or acts on that output. Call it before you pay on, return, store or act on a draft answer, especially when you have the evidence the answer should be based on. Do NOT call it to look up facts (it does no web search and only checks against the evidence you pass), to compare several agents' answers (use consensus), or for offline evaluation over a dataset. Inputs: task, agent_output, evidence, criteria, retain, and optional agent_id and version tags. Returns: verdict, score, reasons, engine, next_step, request_id, retention, the tags when sent, and receipt when signing is configured. On pass, use the output. On retry, revise using reasons and call again, at most 2 or 3 times. On fail, stop. Optional checks run first; on failure you get next_step.hint saying what to fix. Branch on next_step.action (pass, retry or escalate). Cost: 1 call. First 3 calls per UTC day need no key; then use Authorization: Bearer or pay per call. A free key covers 10 calls per UTC day (get_api_key or https://screwtape.ai/signup/). After the shared 3/day anonymous allowance (3/minute, global 2000/day), tools/call without a key or payment is HTTP 200 with isError true and the payment requirements in structuredContent.
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": {
"task": "<task>",
"agent_output": "<agent_output>"
},
"name": "judge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Optional. blocking (the default) is today's behaviour. advisory computes the same verdict, checks, next_step and receipt, then adds mode, decision_owner human, recommended_action (approve, review or return) and a notice. The receipt signs mode advisory as schema_version 5. Same price. | |
| task | Yes | The original instruction or question the agent was answering. | |
| share | No | Optional. false keeps this call out of opt-in data sharing even when the key has sharing on. It cannot turn sharing on. | |
| checks | No | Optional. The worker runs each check. A failed check forces verdict fail. Types include url_contains, json_schema, equals, regex, numeric, required_fields, types, format, sum and duplicate. duplicate (at most 1) compares an invoice with ones this caller recorded earlier and stores keyed fingerprints only when store is true. At most 3 url_contains checks. Local checks run first; if one fails, no model is called and next_step says what to fix. | |
| retain | No | Optional. true stores this call for 24 hours; requires an API key. Default false stores nothing. | |
| version | No | Optional version tag for that agent. At most 64 characters. | |
| agent_id | No | Optional tag for the agent making this call. 1 to 64 characters: letters, digits, and . _ : -. This is not the per-answer agent_id on a consensus answer. | |
| criteria | No | Optional. Facts or terms the answer must contain, one per string. | |
| evidence | No | Optional. Source passages the answer must be grounded in, one string per passage. Without evidence, grounding cannot be checked. | |
| agent_output | Yes | The agent's draft answer to check. Pass JSON as a string. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Present only when the call sent mode: advisory. | |
| model | No | ||
| score | Yes | null when no model gave a verdict (degraded). | |
| checks | No | ||
| claims | No | ||
| engine | No | groq, workers_ai, deterministic, or demo. Also signed into the receipt. | |
| notice | No | Advisory only. Fixed text: the call does not approve, hold or release any payment. | |
| reasons | Yes | ||
| receipt | No | ||
| verdict | Yes | ||
| version | No | Echoed when the call sent a version tag. | |
| agent_id | No | Echoed when the call sent an agent_id tag. | |
| degraded | No | ||
| duplicate | No | Present only when the call sent a duplicate check. status is unique, duplicate, possible_duplicate, replay or not_checked. Carries no invoice data. | |
| next_step | No | ||
| retention | No | ||
| request_id | Yes | ||
| fail_closed | No | Present and true only when a finance check failed closed because the primary model was unavailable. Treat it as review. | |
| verification | No | ||
| decision_owner | No | Advisory only. A person owns the decision. | |
| receipt_reason | No | ||
| recommended_action | No | Advisory only, deterministic and not signed. Judge: next_step pass is approve, escalate is review, retry is return (send back to the agent). Consensus: risk low is approve, medium or high is review. |