Skip to main content
Glama

One contract

get_contract
Read-only

One deployed contract: the hash and size of its current code, what the code exposes (the four ERC-20 view functions, ERC-165, an EIP-1167 minimal proxy and its target), the proxy pattern detected in it, and its lifecycle — the deploying account, the creating transaction, code changes and self-destruction. An address with no indexed code is refused (not_found). Use it to learn how a contract is built. Not for the selectors in its code (get_contract_selectors), its implementations (get_contract_proxy) or the address as an account (get_entity_overview). Not for its code hashes and fingerprint in one place: use get_contract_identity. Not for how its code can change: use get_contract_security.

Arguments: address. chain_id defaults to 1 (Ethereum mainnet, the only chain served). Freshness: the contract as TraceFast's contract index holds it, refreshed in batches usually minutes behind the chain — a contract deployed since may not be found yet. It states no block (meta.asOfBlock is absent). meta.cached is true when the answer came from the TraceFast response cache (refreshed within minutes); meta.timestamp is when it was produced, in Unix milliseconds.

Minimum plan: Enriched Data; the Intelligence and Investigation plans include it. Rate class: core. Documentation: https://docs.tracefast.xyz/api/contract

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": {
      "address": "<address>"
    },
    "name": "get_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYesThe contract address, `0x`-prefixed, 40 hex characters, any case.
chain_idNoChain id. Only 1 (Ethereum mainnet) is served; the default.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "data": {
      -        "properties": {
      -          "address": {
      -            "type": "string"
      -          },
      -          "blockNumber": {
      -            "type": "integer"
      -          },
      -          "bytecodeSize": {
      -            "type": "integer"
      -          },
      -          "bytecodeVariant": {
      -            "type": "string"
      -          },
      -          "chainId": {
      -            "type": "integer"
      -          },
      -          "codeFeatures": {
      -            "oneOf": [
      -              {
      -                "type": "null"
      -              },
      -              {
      -                "properties": {
      -                  "delegatecallTargetFromStorage": {
      -                    "type": [
      -                      "boolean",
      -                      "null"
      -                    ]
      -                  },
      -                  "hasCallcode": {
      -                    "type": "boolean"
      -                  },
      -                  "hasDelegatecall": {
      -                    "type": "boolean"
      -                  }
      -                },
      -                "required": [
      -                  "hasDelegatecall",
      -                  "hasCallcode"
      -                ],
      -                "type": "object"
      -              }
      -            ]
      -          },
      -          "codeHash": {
      -            "type": "string"
      -          },
      -          "erc20Interface": {
      -            "properties": {
      -              "hasDecimals": {
      -                "type": "boolean"
      -              },
      -              "hasName": {
      -                "type": "boolean"
      -              },
      -              "hasSymbol": {
      -                "type": "boolean"
      -              },
      -              "hasTotalSupply": {
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "hasDecimals",
      -              "hasSymbol",
      -              "hasName",
      -              "hasTotalSupply"
      -            ],
      -            "type": "object"
      -          },
      -          "isEip1167Proxy": {
      -            "type": "boolean"
      -          },
      -          "isErc165": {
      -            "type": "boolean"
      -          },
      -          "isErc20": {
      -            "type": "boolean"
      -          },
      -          "lifecycle": {
      -            "oneOf": [
      -              {
      -                "type": "null"
      -              },
      -              {
      -                "properties": {
      -                  "codeChangeCount": {
      -                    "type": "integer"
      -                  },
      -                  "deployBlock": {
      -                    "type": "integer"
      -                  },
      -                  "deployCallType": {
      -                    "type": [
      -                      "string",
      -                      "null"
      -                    ]
      -                  },
      -                  "deployCodeHash": {
      -                    "type": "string"
      -                  },
      -                  "deployTxHash": {
      -                    "type": [
      -                      "string",
      -                      "null"
      -                    ]
      -                  },
      -                  "deployTxIndex": {
      -                    "minimum": 0,
      -                    "type": [
      -                      "integer",
      -                      "null"
      -                    ]
      -                  },
      -                  "deployer": {
      -                    "type": [
      -                      "string",
      -                      "null"
      -                    ]
      -                  },
      -                  "isAlive": {
      -                    "type": "boolean"
      -                  },
      -                  "latestCodeBlock": {
      -                    "type": "integer"
      -                  },
      -                  "latestCodeHash": {
      -                    "type": [
      -                      "string",
      -                      "null"
      -                    ]
      -                  },
      -                  "origin": {
      -                    "type": [
      -                      "string",
      -                      "null"
      -                    ]
      -                  },
      -                  "selfDestructBlock": {
      -                    "type": [
      -                      "integer",
      -                      "null"
      -                    ]
      -                  }
      -                },
      -                "required": [
      -                  "deployBlock",
      -                  "latestCodeBlock",
      -                  "deployCodeHash",
      -                  "codeChangeCount",
      -                  "isAlive"
      -                ],
      -                "type": "object"
      -              }
      -            ]
      -          },
      -          "proxyConfidence": {
      -            "minimum": 0,
      -            "type": [
      -              "integer",
      -              "null"
      -            ]
      -          },
      -          "proxyFamily": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "proxyImplementation": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "selectorCount": {
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "chainId",
      -          "address",
      -          "codeHash",
      -          "blockNumber",
      -          "bytecodeSize",
      -          "bytecodeVariant",
      -          "isErc20",
      -          "isErc165",
      -          "isEip1167Proxy",
      -          "selectorCount",
      -          "erc20Interface"
      -        ],
      -        "type": "object"
      -      },
      -      "links": {
      -        "properties": {
      -          "web": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "web"
      -        ],
      -        "type": "object"
      -      },
      -      "meta": {
      -        "properties": {
      -          "asOfBlock": {
      -            "minimum": 0,
      -            "type": [
      -              "integer",
      -              "null"
      -            ]
      -          },
      -          "cached": {
      -            "type": "boolean"
      -          },
      -          "chain": {
      -            "type": "string"
      -          },
      -          "coverage": {
      -            "additionalProperties": {
      -              "type": "integer"
      -            },
      -            "propertyNames": {
      -              "type": "string"
      -            },
      -            "type": [
      -              "object",
      -              "null"
      -            ]
      -          },
      -          "docs": {
      -            "type": "string"
      -          },
      -          "timestamp": {
      -            "minimum": 0,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "chain",
      -          "timestamp",
      -          "cached",
      -          "docs"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "data",
      -      "meta",
      -      "links"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "error": {
      -        "properties": {
      -          "code": {
      -            "type": "string"
      -          },
      -          "details": {
      -            "type": [
      -              "object",
      -              "null"
      -            ]
      -          },
      -          "message": {
      -            "type": "string"
      -          },
      -          "requestId": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "data": {
      +        "properties": {
      +          "address": {
      +            "type": "string"
      +          },
      +          "blockNumber": {
      +            "type": "integer"
      +          },
      +          "bytecodeSize": {
      +            "type": "integer"
      +          },
      +          "bytecodeVariant": {
      +            "type": "string"
      +          },
      +          "chainId": {
      +            "type": "integer"
      +          },
      +          "codeFeatures": {
      +            "properties": {
      +              "delegatecallTargetFromStorage": {
      +                "type": "boolean"
      +              },
      +              "hasCallcode": {
      +                "type": "boolean"
      +              },
      +              "hasDelegatecall": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "hasDelegatecall",
      +              "hasCallcode"
      +            ],
      +            "type": "object"
      +          },
      +          "codeHash": {
      +            "type": "string"
      +          },
      +          "erc20Interface": {
      +            "properties": {
      +              "hasDecimals": {
      +                "type": "boolean"
      +              },
      +              "hasName": {
      +                "type": "boolean"
      +              },
      +              "hasSymbol": {
      +                "type": "boolean"
      +              },
      +              "hasTotalSupply": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "hasDecimals",
      +              "hasSymbol",
      +              "hasName",
      +              "hasTotalSupply"
      +            ],
      +            "type": "object"
      +          },
      +          "isEip1167Proxy": {
      +            "type": "boolean"
      +          },
      +          "isErc165": {
      +            "type": "boolean"
      +          },
      +          "isErc20": {
      +            "type": "boolean"
      +          },
      +          "lifecycle": {
      +            "properties": {
      +              "codeChangeCount": {
      +                "type": "integer"
      +              },
      +              "deployBlock": {
      +                "type": "integer"
      +              },
      +              "deployCallType": {
      +                "type": "string"
      +              },
      +              "deployCodeHash": {
      +                "type": "string"
      +              },
      +              "deployTxHash": {
      +                "type": "string"
      +              },
      +              "deployTxIndex": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "deployer": {
      +                "type": "string"
      +              },
      +              "isAlive": {
      +                "type": "boolean"
      +              },
      +              "latestCodeBlock": {
      +                "type": "integer"
      +              },
      +              "latestCodeHash": {
      +                "type": "string"
      +              },
      +              "origin": {
      +                "type": "string"
      +              },
      +              "selfDestructBlock": {
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "deployBlock",
      +              "latestCodeBlock",
      +              "deployCodeHash",
      +              "codeChangeCount",
      +              "isAlive"
      +            ],
      +            "type": "object"
      +          },
      +          "proxyConfidence": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "proxyFamily": {
      +            "type": "string"
      +          },
      +          "proxyImplementation": {
      +            "type": "string"
      +          },
      +          "selectorCount": {
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "chainId",
      +          "address",
      +          "codeHash",
      +          "blockNumber",
      +          "bytecodeSize",
      +          "bytecodeVariant",
      +          "isErc20",
      +          "isErc165",
      +          "isEip1167Proxy",
      +          "selectorCount",
      +          "erc20Interface"
      +        ],
      +        "type": "object"
      +      },
      +      "links": {
      +        "properties": {
      +          "web": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "web"
      +        ],
      +        "type": "object"
      +      },
      +      "meta": {
      +        "properties": {
      +          "asOfBlock": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "cached": {
      +            "type": "boolean"
      +          },
      +          "chain": {
      +            "type": "string"
      +          },
      +          "coverage": {
      +            "additionalProperties": {
      +              "type": "integer"
      +            },
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "docs": {
      +            "type": "string"
      +          },
      +          "timestamp": {
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "chain",
      +          "timestamp",
      +          "cached",
      +          "docs"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "data",
      +      "meta",
      +      "links"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "details": {
      +            "additionalProperties": true,
      +            "type": "object"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "requestId": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so the safety profile is known. The description adds substantial context beyond that: the not_found refusal for unindexed addresses, batch-refresh lag, absence of meta.asOfBlock, semantics of meta.cached and meta.timestamp, plus plan and rate class. These are genuinely useful operational details rather than restatements.

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?

Front-loaded with the payload description before the routing exclusions and the operational metadata, which is the right ordering. It is dense and mostly earns its length, though the plan/rate-class/docs tail is closer to boilerplate than to selection-critical information.

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?

An output schema exists, so return structure is covered; the description need only complement it, and it does so with freshness caveats, meta field semantics, and the failure mode. For a read-only single-entity lookup, nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so both address and chain_id are already documented, including the 0x/40-hex format and chain_id's default of 1. The description's contribution is largely a restatement of the single-chain constraint, though it does usefully imply the address must be a contract with indexed code rather than an arbitrary account.

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?

Names a specific resource ('One deployed contract') and enumerates exactly what it returns: code hash and size, exposed interfaces (ERC-20 views, ERC-165, EIP-1167 proxy and target), detected proxy pattern, and lifecycle data. It is immediately distinguishable from get_contract_selectors, get_contract_proxy, get_contract_identity and get_contract_security.

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

Usage Guidelines5/5

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

Gives an explicit positive use case ('Use it to learn how a contract is built') and four explicit exclusions each paired with the sibling that should be used instead. An agent can route correctly without inferring anything from names alone.

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.

Resources