Skip to main content
Glama

EVM & Solana Chain Reads (Tanod)

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. First observed

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered. The description adds genuinely new operational context beyond them: the read path (code, EIP-1967/EIP-1822/OZ legacy slots, slot 0, then one multicall), the caveat that an upgradeable proxy's implementation can change after the read, 5xx behavior for malformed node answers with no charge, latency (1-4s), price (USD 0.002) and a free-tier quota of 10 chain reads per IP per UTC day.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the sibling routing rule are front-loaded, then operational detail. It is dense and well-ordered, but the long enumeration of `kind` values and the return-field list partly duplicate the existing output schema, making it longer than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a paid, network-dependent read tool the description covers cost, rate limits, latency, failure semantics, and the important liveness caveat about implementation changes. Combined with the output schema and read-only annotations, an agent has everything needed to call it and interpret the result responsibly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and both parameters (chain enum, address pattern) are fully documented in the schema. The description adds no further meaning about how chain selection affects behavior or which chains support which proxy kinds, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('detect whether a contract is a proxy, and of which kind') and explicitly separates itself from the sibling get_contract_code ('For code size and hash use get_contract_code'). An agent can choose between the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear routing rule to the sibling tool for a related but different need (code size and hash), which covers the main alternative. It does not spell out exclusions such as non-contract addresses or chains outside the enum, so it stops short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.