# Bounty Engineer Tool Output Quality Gate

> Bounty Engineer Tool Output Quality Gate is a paid API for AI agents from bounty-engineer-x402-prod.onrender.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Validates tool output quality by checking schema conformance, data freshness, required field presence, and empty-value ratios before an agent acts on the result.

## Facts

- Endpoint: POST https://bounty-engineer-x402-prod.onrender.com/v1/tool-output-quality-gate?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bounty-engineer-tool-output-quality-gate-27e8d16c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fWvQ645LZWR_kaVIsVb-D

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability bounty-engineer-tool-output-quality-gate-27e8d16c -d '<json body>'
```

Example prompt: Before I use this price feed result, check its quality: validate that it has /id and /price fields, that the data is no more than 86400 seconds old (observed at 2024-06-01T12:00:00Z), and that the empty field ratio doesn't exceed 0.1.

## When to prefer this

Use this endpoint when an AI agent needs a cheap, fast, deterministic gate before acting on a tool's output — especially when staleness, missing fields, or schema conformance could cause downstream errors. Prefer it over ad-hoc agent-side checks when you need a SHA-256 audit trail of the validated value or when standardizing quality gates across a multi-tool pipeline. Not suitable for semantic or factual correctness verification.

## Known failure modes

- Missing or malformed 'value' field causes validation to fail with schema errors
- 'observed_at' timestamp in wrong format results in freshness check failure
- 'required_paths' entries that don't match JSON Pointer format are silently skipped or error
- 'max_empty_ratio' outside 0–1 range rejected by input schema
- Freshness always flagged stale if 'observed_at' is absent
- Does not detect factual incorrectness — only structural and freshness issues

## How this service works

Machine-buyable infrastructure for autonomous agents: API cost routing, margin optimization, funding-rate data, webpage extraction, result verification, spend controls, retry planning, state, tender search and GitHub bounty intelligence.

## Output

Returns a JSON object with an overall 'ok' boolean, a 'decision' field (accept/reject), a list of 'issues' with codes like 'freshness_stale', freshness metadata including age_seconds and status, leaf-level statistics (total leaves, empty count, empty_ratio), schema validation results with any errors, a SHA-256 hash of the validated value, and a list of missing required paths.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "value": {},
  "schema": {},
  "observed_at": {
   "type": "string"
  },
  "required_paths": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 100
  },
  "max_age_seconds": {
   "type": "integer"
  },
  "max_empty_ratio": {
   "type": "number",
   "maximum": 1,
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "mode": "tool_output_quality_gate",
  "issues": [
   {
    "code": "freshness_stale",
    "age_seconds": 965506
   }
  ],
  "decision": "reject",
  "freshness": {
   "status": "stale",
   "age_seconds": 965506,
   "max_age_seconds": 86400
  },
  "leaf_stats": {
   "empty": 0,
   "leaves": 3,
   "empty_ratio": 0
  },
  "validation": {
   "valid": true,
   "errors": [],
   "error_count": 0,
   "errors_truncated": false
  },
  "limitations": [
   "Quality checks structural completeness, declared freshness and schema conformance. It does not verify factual correctness."
  ],
  "value_sha256": "160aba927402189461c7e3537f7d025926e02e60fb2aa04e926bba246540bfb8",
  "missing_paths": [],
  "required_paths": [
   "/id",
   "/price"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bounty-engineer-tool-output-quality-gate-27e8d16c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bounty-engineer-x402-prod.onrender.com](https://www.zero.xyz/host/bounty-engineer-x402-prod.onrender.com/llms.txt)
