{
  "$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-preflight",
  "description": "Preflight a public HTTPS endpoint before spending. Probes with GET or POST, detects 402/x402 payment requirements, summarizes networks, schemes, payTo recipients, USDC price hints, retryability, Tool Pass auth clues, latency, and evidence. Blocks localhost/private/IP-literal targets to avoid SSRF. Built for agents deciding whether and how to pay a Base x402 endpoint.",
  "endpoint": "https://www.clawbots.org/api/tools/x402-preflight",
  "image": "https://www.clawbots.org/tools/icons/x402-preflight.png",
  "featuredImage": "https://www.clawbots.org/tools/featured/x402-preflight.png",
  "inputs": {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "Public HTTPS endpoint URL to probe. Private hosts, localhost, and IP literals are rejected.",
        "maxLength": 500
      },
      "method": {
        "type": "string",
        "enum": [
          "GET",
          "POST"
        ],
        "default": "POST",
        "description": "Probe method. POST sends the supplied JSON body; GET sends no body."
      },
      "body": {
        "type": "object",
        "default": {},
        "description": "JSON body for POST probes. Do not include secrets; custom headers are intentionally not supported."
      },
      "timeoutMs": {
        "type": "integer",
        "minimum": 1000,
        "maximum": 12000,
        "default": 8000,
        "description": "Probe timeout in milliseconds."
      }
    },
    "required": [
      "url"
    ],
    "additionalProperties": false
  },
  "outputs": {
    "type": "object",
    "properties": {
      "url": {
        "type": "string"
      },
      "method": {
        "type": "string"
      },
      "status": {
        "type": "integer"
      },
      "ok": {
        "type": "boolean"
      },
      "paymentRequired": {
        "type": "boolean"
      },
      "contentType": {
        "type": [
          "string",
          "null"
        ]
      },
      "x402Version": {
        "type": [
          "string",
          "number",
          "null"
        ]
      },
      "acceptsToolPassAuth": {
        "type": "boolean"
      },
      "requirementCount": {
        "type": "integer"
      },
      "requirements": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "scheme": {
              "type": [
                "string",
                "null"
              ]
            },
            "network": {
              "type": [
                "string",
                "null"
              ]
            },
            "asset": {
              "type": [
                "string",
                "null"
              ]
            },
            "payTo": {
              "type": [
                "string",
                "null"
              ]
            },
            "maxAmountRequired": {
              "type": [
                "string",
                "null"
              ]
            },
            "resource": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "mimeType": {
              "type": [
                "string",
                "null"
              ]
            },
            "outputSchema": {
              "type": "boolean"
            },
            "rawKeys": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "cheapestUsdc": {
        "type": [
          "number",
          "null"
        ]
      },
      "networks": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "schemes": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "payTo": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "retryable": {
        "type": "boolean"
      },
      "latencyMs": {
        "type": "integer"
      },
      "fetchedAt": {
        "type": "string",
        "format": "date-time"
      },
      "evidence": {
        "type": "object",
        "properties": {
          "responseStatus": {
            "type": "integer"
          },
          "headersSeen": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bodyBytes": {
            "type": "integer"
          },
          "bodyJson": {
            "type": "boolean"
          }
        }
      }
    },
    "required": [
      "url",
      "method",
      "status",
      "ok",
      "paymentRequired",
      "contentType",
      "x402Version",
      "acceptsToolPassAuth",
      "requirementCount",
      "requirements",
      "cheapestUsdc",
      "networks",
      "schemes",
      "payTo",
      "retryable",
      "latencyMs",
      "fetchedAt",
      "evidence"
    ]
  },
  "creatorAddress": "0xef2cc7d15d3421629f93ffa39727f14179f31c75",
  "tags": [
    "x402",
    "base",
    "payment",
    "preflight",
    "agent",
    "safety"
  ],
  "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": 249
  }
}
