{
  "$comment": "GENERATED FROM api/_tools/<slug>/route.mjs — do not edit by hand",
  "type": "https://eips.ethereum.org/EIPS/eip-8257#tool-manifest-v1",
  "name": "tool-receipt-check",
  "description": "Preflight a tool before another agent trusts or pays it. Fetches a live ERC-8257 ai-tool manifest, validates it with @opensea/tool-sdk, computes the manifest hash, compares it to Base ToolRegistry state, checks the Tool Pass predicate collection when present, and probes the endpoint for live/payment status. Built for provenance, cadence, and failure-semantics checks before agent-to-tool spend.",
  "endpoint": "https://www.clawbots.org/api/tools/tool-receipt-check",
  "image": "https://www.clawbots.org/tools/icons/tool-receipt-check.png",
  "featuredImage": "https://www.clawbots.org/tools/featured/tool-receipt-check.png",
  "inputs": {
    "type": "object",
    "properties": {
      "slug": {
        "type": "string",
        "description": "Clawbots ai-tool slug. Builds https://www.clawbots.org/.well-known/ai-tool/<slug>.json.",
        "pattern": "^[a-z0-9-]{3,80}$"
      },
      "manifestUrl": {
        "type": "string",
        "description": "Explicit HTTPS ERC-8257 ai-tool manifest URL. Use this for non-clawbots tools.",
        "maxLength": 500
      },
      "toolId": {
        "type": "integer",
        "description": "Optional Base ERC-8257 ToolRegistry id. If omitted, the checker uses manifest.onChain.toolId when present.",
        "minimum": 1
      },
      "probeEndpoint": {
        "type": "boolean",
        "default": true,
        "description": "POST {} to the manifest endpoint and summarize status/x402 requirements. Disable for endpoints where a probe would be inappropriate."
      },
      "timeoutMs": {
        "type": "integer",
        "minimum": 2000,
        "maximum": 12000,
        "default": 8000,
        "description": "Per-network-call timeout in milliseconds."
      }
    },
    "additionalProperties": false,
    "anyOf": [
      {
        "required": [
          "slug"
        ]
      },
      {
        "required": [
          "manifestUrl"
        ]
      }
    ]
  },
  "outputs": {
    "type": "object",
    "properties": {
      "slug": {
        "type": [
          "string",
          "null"
        ]
      },
      "manifestUrl": {
        "type": "string"
      },
      "endpoint": {
        "type": [
          "string",
          "null"
        ]
      },
      "chain": {
        "type": "string"
      },
      "registry": {
        "type": "string"
      },
      "fetchedAt": {
        "type": "string",
        "format": "date-time"
      },
      "verdict": {
        "type": "string",
        "enum": [
          "pass",
          "warn",
          "fail"
        ],
        "description": "pass when manifest, registry hash, predicate collection, and endpoint probe all check out; warn/fail otherwise."
      },
      "problems": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "manifest": {
        "type": "object",
        "description": "Live manifest status, SDK validity, and computed hash."
      },
      "onChain": {
        "type": [
          "object",
          "null"
        ],
        "description": "Base ToolRegistry config and equality checks, if a toolId was available."
      },
      "endpointProbe": {
        "type": "object",
        "description": "Unauthenticated POST {} probe summary."
      },
      "evidence": {
        "type": "object",
        "description": "RPCs, registry calls, and bytes used for the receipt."
      }
    },
    "required": [
      "slug",
      "manifestUrl",
      "endpoint",
      "chain",
      "registry",
      "fetchedAt",
      "verdict",
      "problems",
      "manifest",
      "onChain",
      "endpointProbe",
      "evidence"
    ]
  },
  "creatorAddress": "0xef2cc7d15d3421629f93ffa39727f14179f31c75",
  "tags": [
    "agent",
    "erc-8257",
    "registry",
    "manifest",
    "provenance",
    "x402",
    "preflight",
    "base"
  ],
  "pricing": [
    {
      "amount": "0.02",
      "asset": "USDC",
      "recipient": "0xef2cc7d15d3421629f93ffa39727f14179f31c75",
      "protocol": "x402"
    }
  ],
  "authentication": [
    {
      "type": "siwe",
      "description": "Sign In With Ethereum. Holders of the Axiom Tool Pass NFT get free unlimited access. Sign a SIWE message proving wallet ownership; the server verifies your wallet holds the pass on-chain.",
      "header": "Authorization: SIWE <base64url(message)>.<0xsignature>",
      "passContract": "0xfc9ce3990f85fA1A3a0eE51a710642396a6Cad82",
      "chain": "base",
      "chainId": 8453,
      "collection": "https://opensea.io/collection/axiom-tool-pass"
    },
    {
      "type": "x402",
      "description": "Pay per call in USDC on Base via the x402 protocol. No account or API key needed.",
      "header": "x-payment: <x402 authorization>"
    }
  ],
  "onChain": {
    "registry": "0x265BB2DBFC0A8165C9A1941Eb1372F349baD2cf1",
    "chainId": 8453,
    "toolId": 294
  }
}
