Skip to main content
Glama

detect_proxy

Read-onlyIdempotent

chainpeek: detect whether a contract is a proxy, and of which kind. For code size and hash use get_contract_code. Reads the code, the EIP-1967 / EIP-1822 / OpenZeppelin legacy slots and slot 0, then one multicall. Returns is_contract, is_proxy, kind (eip1967_transparent | eip1967_uups | eip1967 | eip1967_beacon | eip1822_uups | oz_legacy | eip1167_minimal | erc7511_minimal | eip7702_delegation, or the multisig-wallet kind when slot 0 and masterCopy() agree), implementation (and whether it has code), admin, beacon and the raw slots. An upgradeable proxy's implementation can change after this read. A malformed or inconsistent node answer is a 5xx and is not charged. Typically 1-4 s. Price: USD 0.002. Free: 10 chain reads per IP per UTC day. Docs: https://tanod.dev/learn/proxy-contract-detection-api.html

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chain": "<chain>",
      "address": "<address>"
    },
    "name": "detect_proxy"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesChain to read.
addressYesContract address (0x + 40 hex).

Output Schema

NameRequiredDescriptionDefault
kindNo
adminNo
chainNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
slotsNo
beaconNo
addressNo
is_proxyNo
patternsNo
rpc_callsNo
code_bytesNo
is_contractNo
implementationNo
implementation_has_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / address / title
      Removed value: -"Address"
    • removedInput schema / properties / chain / title
      Removed value: -"Chain"
    • removedInput schema / title
      Removed value: -"detect_proxyArguments"
    • removedOutput schema / properties / patterns / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
  2. Changed1 schema field changed
    • changedInput schema / properties / chain / enum
      Previous value: -[
      -  "ethereum",
      -  "base"
      -]New value: +[
      +  "ethereum",
      +  "base",
      +  "robinhood"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "address": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "admin": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "beacon": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "chain": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "code_bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "implementation": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "implementation_has_code": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "is_contract": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "is_proxy": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "kind": {
      +      "enum": [
      +        "eip1967_transparent",
      +        "eip1967_uups",
      +        "eip1967",
      +        "eip1967_beacon",
      +        "eip1822_uups",
      +        "oz_legacy",
      +        "safe",
      +        "eip1167_minimal",
      +        "erc7511_minimal",
      +        "eip7702_delegation",
      +        null
      +      ],
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "patterns": {
      +      "items": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "rpc_calls": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "slots": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  4. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources