{
  "$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": "rarity-rank",
  "description": "OpenSea rarity rank for a specific NFT token, with each trait annotated by collection-wide frequency and the current best ask. Useful for deciding whether a listing price is justified by rarity.",
  "endpoint": "https://www.clawbots.org/api/tools/rarity-rank",
  "inputs": {
    "type": "object",
    "properties": {
      "collection": {
        "type": "string",
        "description": "OpenSea collection slug (lowercase a-z, 0-9, dash)."
      },
      "tokenId": {
        "type": "string",
        "description": "Numeric token ID within the collection."
      },
      "chain": {
        "type": "string",
        "enum": [
          "ethereum",
          "base",
          "polygon",
          "arbitrum",
          "optimism"
        ],
        "default": "ethereum"
      }
    },
    "required": [
      "collection",
      "tokenId"
    ],
    "additionalProperties": false
  },
  "outputs": {
    "type": "object",
    "properties": {
      "collection": {
        "type": "string"
      },
      "collectionName": {
        "type": "string"
      },
      "tokenId": {
        "type": "string"
      },
      "chain": {
        "type": "string"
      },
      "contract": {
        "type": "string"
      },
      "totalSupply": {
        "type": [
          "integer",
          "null"
        ]
      },
      "rarityRank": {
        "type": [
          "integer",
          "null"
        ],
        "description": "1 = rarest."
      },
      "rarityScore": {
        "type": [
          "number",
          "null"
        ]
      },
      "rarityStrategy": {
        "type": [
          "string",
          "null"
        ],
        "description": "OpenSea rarity strategy version that produced the rank."
      },
      "topPercentile": {
        "type": [
          "number",
          "null"
        ],
        "description": "(rank / totalSupply) * 100."
      },
      "listingEth": {
        "type": [
          "number",
          "null"
        ],
        "description": "Current best ask in ETH; null when unlisted."
      },
      "imageUrl": {
        "type": [
          "string",
          "null"
        ]
      },
      "traits": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "value": {
              "type": "string"
            },
            "count": {
              "type": [
                "integer",
                "null"
              ]
            },
            "frequencyPct": {
              "type": [
                "number",
                "null"
              ],
              "description": "Collection-wide frequency of this trait value, in %."
            }
          },
          "required": [
            "type",
            "value"
          ]
        }
      },
      "traitCount": {
        "type": "integer"
      },
      "fetchedAt": {
        "type": "string",
        "format": "date-time"
      }
    },
    "required": [
      "collection",
      "collectionName",
      "tokenId",
      "chain",
      "contract",
      "traits",
      "traitCount",
      "fetchedAt"
    ]
  },
  "creatorAddress": "0xef2cc7d15d3421629f93ffa39727f14179f31c75",
  "tags": [
    "opensea",
    "nft",
    "rarity",
    "traits",
    "ethereum",
    "base"
  ],
  "pricing": [
    {
      "amount": "0.03",
      "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": 56
  }
}
