---
name: verify-json-evidence
description: Purchase deterministic assertions over supplied JSON and verify the Ed25519-signed result. Use when an agent needs a bounded, auditable JSON check through MCP or HTTP with x402 payment.
compatibility: Requires HTTPS access and an MCP Streamable HTTP or x402-compatible HTTP client.
metadata:
  author: kgninja
  version: "0.2.1"
  service-url: "https://agent-economy.kgninja.dev"
---

# Verify JSON Evidence

Use the Agent Verification Utility at https://agent-economy.kgninja.dev to run explicit assertions over JSON supplied by the caller. Treat a passing result only as proof that the declared checks ran over those bytes; never treat it as proof that a real-world claim is true.

## Preferred MCP workflow

1. Connect to https://agent-economy.kgninja.dev/mcp with Streamable HTTP using MCP protocol version 2026-07-28.
2. Call `describe_verify_evidence` to inspect limits or `quote_verify_evidence` for a free quote.
3. Call `verify_evidence` with a unique 16–128 character `idempotency_key` and the complete request.
4. If the result has `_meta["x402/error"]`, compare its network, asset, atomic USDC amount, and `payTo` address with the caller's payment policy. Only after approval, select and sign one advertised payment requirement. Retry the identical tool call with the encoded payment in `_meta["x402/payment"]`.
5. Preserve `_meta["x402/payment-response"]` as settlement proof. Verify the returned evidence signature with https://agent-economy.kgninja.dev/.well-known/jwks.json before relying on it.

## Request construction

Follow https://agent-economy.kgninja.dev/openapi.json#/components/schemas/VerifyEvidenceRequest. Supply a `client_request_id`, `evidence.media_type` set to `application/json`, base64-encoded JSON in `evidence.content_base64`, and 1–16 assertions. Supported operations are `sha256_equals`, `json_pointer_exists`, `json_pointer_equals`, and `json_type_is`. Decoded evidence must not exceed 65,536 bytes.

Minimal paid-tool arguments:

```json
{
  "idempotency_key": "agent-example-idem-001",
  "request": {
    "client_request_id": "agent-example-001",
    "evidence": {
      "media_type": "application/json",
      "content_base64": "eyJzdGF0dXMiOiJyZWFkeSJ9"
    },
    "assertions": [
      { "op": "json_pointer_equals", "path": "/status", "expected": "ready" }
    ]
  }
}
```

## HTTP fallback

POST the request to https://agent-economy.kgninja.dev/quote with `Idempotency-Key`. Then POST the identical request to https://agent-economy.kgninja.dev/verify-evidence with `X-Quote-ID`. On HTTP 402, sign the `PAYMENT-REQUIRED` challenge and retry with `PAYMENT-SIGNATURE`. Preserve `PAYMENT-RESPONSE` and the signed receipt.

Never send secrets or unnecessary personal data. The utility does not fetch URLs, execute user code, invoke a model, or retain raw evidence in D1.
