Skip to main content
Glama

chain_storage_slot

Read-only

Solidity storage slot calculator + reader — Compute the EVM storage slot of any Solidity variable and optionally read it live: mapping entries keccak256(abi.encode(key, slot)) with auto-detected key types (address, uint256, int256, bytes32, bool, string/bytes keys hashed unpadded), nested mappings (key=a,b for m[a][b]), dynamic array elements (index=, element_slots=), struct field offset (offset=) and ERC-7201 namespaced storage (namespace=openzeppelin.storage.ERC20). Shows every derivation step plus the EIP-1967 proxy slots. Add contract= and chain= (ethereum, base, arbitrum, optimism, polygon) to read the slot with eth_getStorageAt and get it decoded as uint and address. Required: slot= (base slot number, decimal or 0x hex) and key= (mapping key) - or namespace= instead of slot. Verified: WETH balanceOf storage (slot 3) matches balanceOf(). Price: $0.002 USDC (Base, via x402).

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": {
      "slot": "<slot>",
      "key": "<key>"
    },
    "name": "chain_storage_slot"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640
slotYes3

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, yet the description still adds material behavior: the supported chain list, that reads go through eth_getStorageAt, that results are decoded as both uint and address, that every derivation step is shown, and that the call costs $0.002 USDC via x402 on Base. Cost and payment rail disclosure is exactly the kind of trait annotations cannot convey.

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 core verb and resource, then progressively narrower detail ending with the required-parameter and price summary. Every clause carries information, but the single dense paragraph with heavy parenthetical cramming is harder to scan than a short structured list would be.

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 two-parameter tool with no output schema, the description covers the derivation algorithm, the decoding of the returned slot, the chain set, the payment requirement, and a verification example (WETH balanceOf at slot 3). An agent has everything needed to call it correctly without guessing.

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

Parameters4/5

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

Schema coverage is 100% but the schema descriptions are only bare examples ('3', a sample address), so the description does real work: slot is a base slot number in decimal or 0x hex, key is the mapping key with auto-detected types including unpadded string/bytes hashing. The deduction is for referencing parameters absent from the schema (namespace=, contract=, chain=, index=, offset=, element_slots=), which can lead an agent to attempt arguments the schema will reject.

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 opens with a specific verb+resource pair ('Solidity storage slot calculator + reader') and enumerates exactly what it computes: mapping slots, nested mappings, array elements, struct offsets, ERC-7201 namespaces, EIP-1967 slots. An agent knows precisely what the tool produces. It stops short of a 5 because it never names or contrasts the sibling 'chain_storage', so the boundary between the two is left to inference.

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?

Usage is well specified for the two modes: compute-only, or add contract= and chain= to read live via eth_getStorageAt. Concrete invocation patterns are given for each storage shape (key=a,b for nested mappings, index= for arrays, offset= for structs, namespace= for ERC-7201). There is no explicit when-not-to-use or alternative-tool routing, which keeps it out of 5 territory.

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