Tool Output Quality Gate
Reject structurally incomplete, stale or schema-invalid tool output before it contaminates the next autonomous step.
1 credit per call · $0.01 USDC with x402
Sample input
{
"value": {
"id": "abc",
"price": 25,
"status": "ok"
},
"schema": {
"type": "object",
"required": [
"id",
"price"
],
"properties": {
"id": {
"type": "string"
},
"price": {
"type": "number"
}
}
},
"required_paths": [
"/id",
"/price"
],
"max_empty_ratio": 0.2,
"observed_at": "2026-09-30T12:00:00Z",
"max_age_seconds": 86400
}Worked sample output
{
"ok": true,
"mode": "tool_output_quality_gate",
"decision": "accept",
"issues": [],
"required_paths": [
"/id",
"/price"
],
"missing_paths": [],
"validation": {
"valid": true,
"error_count": 0,
"errors": [],
"errors_truncated": false
},
"leaf_stats": {
"leaves": 3,
"empty": 0,
"empty_ratio": 0
},
"freshness": {
"status": "fresh",
"age_seconds": 26279,
"max_age_seconds": 86400
},
"value_sha256": "160aba927402189461c7e3537f7d025926e02e60fb2aa04e926bba246540bfb8",
"limitations": [
"Quality checks structural completeness, declared freshness and schema conformance. It does not verify factual correctness."
]
}Worked example using published sample data only. Own-data execution is paid.
Connect in curl
Set BOUNTY_API_KEY privately after your payment is verified. Change the retry key for each new logical request.
curl 'https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/tool-output-quality-gate' \
-H "Authorization: Bearer $BOUNTY_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: workflow-request-001' \
-H 'X-Max-Credits: 1' \
--data '{"value":{"id":"abc","price":25,"status":"ok"},"schema":{"type":"object","required":["id","price"],"properties":{"id":{"type":"string"},"price":{"type":"number"}}},"required_paths":["/id","/price"],"max_empty_ratio":0.2,"observed_at":"2026-09-30T12:00:00Z","max_age_seconds":86400}'Connect in n8n
Download the inactive n8n template. Import it, configure the private Header Auth credential, inspect the sample and run it manually. A new execution creates a new billable request; there is no automatic schedule.
Use an HTTP POST to https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/tool-output-quality-gate. Send JSON and these headers; store the Bearer token as a private credential.
{
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_PRIVATE_API_KEY",
"Content-Type": "application/json",
"Idempotency-Key": "UNIQUE_PER_LOGICAL_REQUEST",
"X-Max-Credits": "1"
},
"body": {
"value": {
"id": "abc",
"price": 25,
"status": "ok"
},
"schema": {
"type": "object",
"required": [
"id",
"price"
],
"properties": {
"id": {
"type": "string"
},
"price": {
"type": "number"
}
}
},
"required_paths": [
"/id",
"/price"
],
"max_empty_ratio": 0.2,
"observed_at": "2026-09-30T12:00:00Z",
"max_age_seconds": 86400
}
}Reuse a retry key only for the same input. Failed execution returns reserved credits. Full integration and recovery guide · Machine-readable recipe