Skip to main content
Glama
laszlopere

mcp-bytesmith

eth_storage_slot

Compute the storage slot for a mapping or dynamic array entry in an Ethereum contract. Provide a layout object with slot and kind, plus key or index.

Instructions

Compute the storage slot for a mapping/array entry given a layout.

layout: {"kind": "mapping"|"dynamic_array", "slot": , ...} mapping -> needs key; "key_type" (default uint256). For nested mappings pass key (and optionally "key_type") as lists. dynamic_array -> needs index; optional "element_size" in slots (default 1). Returns {slot, slot_hex}: the slot as a decimal string and a 0x 32-byte word.

Example: eth_storage_slot({"kind":"mapping","slot":1}, "0x0000000000000000000000000000000000000000") -> slot_hex="0xa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layoutYesLayout object: {"kind":"mapping"|"dynamic_array", "slot": <declared base slot, int/decimal/0x-hex>, ...}. mapping takes optional "key_type" (default "uint256"; lists for nested mappings); dynamic_array takes optional "element_size" in slots (default 1). A stringified JSON object is accepted.
keyNoMapping key (required for kind=mapping); pass a list of keys outer-to-inner for nested mappings. Ignored for arrays.
indexNoElement index (required for kind=dynamic_array); int/decimal/0x-hex. Ignored for mappings.
Behavior4/5

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

With no annotations, the description covers input types (layout, key, index), return format (decimal slot string and 0x-hex 32-byte word), and additional options like 'key_type' and 'element_size'. It does not disclose error behavior or side effects, but for a computation tool this is acceptable.

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?

The description is concise yet informative, front-loading the main purpose and then detailing parameters and example. It could be slightly more terse, but the structure is well-organized and every sentence adds value.

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?

Given the complexity of storage slot computation (nested mappings, key_type, element_size), the description is thorough. It covers both kinds, optional parameters, nested key lists, return format, and includes an example. Since there is no output schema, the description adequately fills that gap.

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 description coverage is 100%, so the baseline is 3. The description adds value by explaining how the layout object works (kind, slot, key_type, element_size), provides an example, and clarifies nested mapping syntax. This goes beyond what the schema properties alone convey.

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?

The description clearly states the tool computes storage slots for mapping/array entries, specifying the two kinds (mapping, dynamic_array) and their required parameters. It distinguishes itself from sibling tools which are unrelated encoding/hash utilities.

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 provides concrete usage contexts: mapping requires a 'key', dynamic_array requires an 'index', and notes nested mapping handling. It includes an example. However, it doesn't explicitly state when not to use this tool (but siblings are clearly different domains).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laszlopere/mcp-bytesmith'

If you have feedback or need assistance with the MCP directory API, please join our Discord server