Skip to main content
Glama

inspect_contract_invariants

Inspect a smart contract, ERC-20 token, or DEX/Vault pool for proxy/admin slots, bytecode opcodes, ERC-20 sanity, and reserve invariants.

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": "inspect_contract_invariants"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNobase
tokensNoOptional extra ERC-20 token addresses to snapshot reserves for
addressYes0x-prefixed EVM contract or pool address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses the analysis categories performed (proxy slots, opcodes, ERC-20 sanity, reserve checks), which implicitly frames this as a read-only diagnostic, but it says nothing about RPC/auth requirements, rate limits, cost, or what happens when the address is an EOA or an unverified contract.

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?

A single dense sentence that front-loads the resource and then lists the checks; no filler or throat-clearing. It is jargon-heavy and would benefit from a brief clause on output or safety, but nothing present is wasted.

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

Completeness3/5

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

For a three-parameter diagnostic tool with no annotations and no output schema, the description covers what is inspected but not what is returned (findings list? boolean flags? risk score?), nor the chain-scoping behavior. The enumerated checks partially substitute for return-value documentation, leaving it adequate but with clear gaps.

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 67%, so the schema already documents the tokens array and address format, and the description adds little parameter meaning beyond tying "reserve invariants" to the token snapshot concept. The chain parameter (enum base/ethereum/arbitrum, default base) is never mentioned in the description, so the agent gets no help on multi-chain scoping beyond the enum itself.

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

Purpose4/5

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

The description pairs a specific verb ("Inspect") with concrete resource types (smart contract, ERC-20 token, DEX/Vault pool) and enumerates the exact checks performed: proxy/admin slots, bytecode opcodes, ERC-20 sanity, and reserve invariants. That is far more informative than a restated name. It does not differentiate itself from the closely related sibling diff_contract_snapshots, which keeps it at 4 rather than 5.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no mention of prerequisite conditions (e.g. that the address must be a deployed contract on a supported chain), and no routing to alternatives such as screen_evm_address or diff_contract_snapshots. The use case is only inferable from the object being inspected.

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