Skip to main content
Glama
trailofbits

Slither MCP Server

Official
by trailofbits

get_storage_layout

Retrieve the storage slot layout of a Solidity contract, including slot numbers, byte offsets, and variable sizes, for upgrade safety analysis or storage collision detection.

Instructions

Computes the storage slot layout for a contract showing slot numbers, byte offsets, and variable sizes. Use this for upgrade safety analysis, storage collision detection, or understanding how variables are packed. Returns ordered slot assignments following Solidity's packing rules. Excludes constants and immutables (not in storage). Can include or exclude inherited storage. Supports pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYes
has_moreNoTrue if there are more results beyond this page
total_countNoTotal number of storage variables
contract_keyNoThe contract analyzed
error_messageNo
storage_slotsNoStorage slot assignments
total_slots_usedNoTotal storage slots used
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that constants and immutables are excluded, inherited storage can be toggled, and pagination is supported. This goes beyond what the schema indicates, though performance or permission details are missing.

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

Conciseness5/5

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

The description is three sentences long, front-loads the purpose, and every sentence contributes meaningful information. There is no wasted text.

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

Completeness4/5

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

Given the complexity of storage layout analysis, the description covers essential aspects: exclusions, inheritance option, pagination, and use cases. An output schema exists, so return values need not be described. A minor gap is lack of mention that the tool is read-only, but overall it is fairly complete.

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?

The description adds value by mentioning pagination and the include_inherited option, which hints at limit/offset and include_inherited parameters. However, it does not describe path or contract_key structure, and the schema descriptions already cover them, so the added value is moderate.

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 clearly states the tool computes storage slot layout, including slot numbers, byte offsets, and variable sizes, and lists use cases. It is specific about the resource and action, though it does not explicitly distinguish from sibling tools.

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

Usage Guidelines3/5

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

The description lists when to use the tool (upgrade safety, storage collision detection) but does not provide explicit guidance on when not to use it or alternatives among the many sibling tools. Usage is implied rather than spelled out.

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/trailofbits/slither-mcp'

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