{
  "$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": "x402-cost-guard",
  "description": "Budget guard for x402 quotes. Pass one or more payment requirements from a 402 envelope and get a deterministic spend/no-spend decision, cheapest compatible requirement, Base USDC compatibility checks, per-quote USDC normalization, and warnings before an agent pays. $0.01 USDC per call; AXIOM Tool Pass holders bypass via SIWE.",
  "endpoint": "https://www.clawbots.org/api/tools/x402-cost-guard",
  "image": "https://www.clawbots.org/tools/icons/x402-cost-guard.png",
  "featuredImage": "https://www.clawbots.org/tools/featured/x402-cost-guard.png",
  "inputs": {
    "type": "object",
    "properties": {
      "accepts": {
        "type": "array",
        "minItems": 1,
        "maxItems": 20,
        "description": "Payment requirements copied from an x402 envelope's accepts/paymentRequirements array.",
        "items": {
          "type": "object"
        }
      },
      "maxUsdc": {
        "type": "number",
        "minimum": 0,
        "maximum": 1000,
        "default": 0.05,
        "description": "Maximum acceptable spend in decimal USDC."
      },
      "preferredNetwork": {
        "type": "string",
        "default": "eip155:8453",
        "description": "Preferred payment network. Defaults to Base mainnet CAIP-2."
      },
      "preferredAsset": {
        "type": "string",
        "default": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "description": "Preferred asset. Defaults to Base USDC."
      },
      "allowMissingPayTo": {
        "type": "boolean",
        "default": false,
        "description": "If false, requirements missing a payTo/recipient are not eligible."
      }
    },
    "required": [
      "accepts"
    ],
    "additionalProperties": false
  },
  "outputs": {
    "type": "object",
    "properties": {
      "decision": {
        "type": "string",
        "enum": [
          "allow",
          "review",
          "deny"
        ]
      },
      "allowed": {
        "type": "boolean"
      },
      "maxUsdc": {
        "type": "number"
      },
      "cheapestCompatible": {
        "type": [
          "object",
          "null"
        ]
      },
      "cheapestUsdc": {
        "type": [
          "number",
          "null"
        ]
      },
      "compatibleCount": {
        "type": "integer"
      },
      "requirementCount": {
        "type": "integer"
      },
      "warnings": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "requirements": {
        "type": "array",
        "items": {
          "type": "object"
        }
      },
      "evidence": {
        "type": "object"
      }
    },
    "required": [
      "decision",
      "allowed",
      "maxUsdc",
      "cheapestCompatible",
      "cheapestUsdc",
      "compatibleCount",
      "requirementCount",
      "warnings",
      "requirements",
      "evidence"
    ]
  },
  "creatorAddress": "0xef2cc7d15d3421629f93ffa39727f14179f31c75",
  "tags": [
    "x402",
    "budget",
    "base",
    "usdc",
    "payment",
    "guard"
  ],
  "pricing": [
    {
      "amount": "0.01",
      "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": 436
  }
}
