Skip to main content
Glama
trailofbits

Slither MCP Server

Official
by trailofbits

analyze_state_variables

Analyze state variables in Solidity projects to audit storage layout, find public state, and understand contract data, with filters for visibility, constants, and immutables.

Instructions

Analyzes state variables across the project or for a specific contract. Use this when auditing storage layout, finding public state, or understanding contract data. Can filter by visibility, include/exclude constants and immutables. Returns variable details including type, visibility, and declaration location. For storage slot layout, use get_storage_layout. Supports pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYes
summaryNoSummary counts by visibility
has_moreNoTrue if there are more results beyond this page
variablesNoList of state variables with their context
total_countNoTotal number of state variables found
error_messageNo
Behavior4/5

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

The description discloses that the tool returns 'variable details including type, visibility, and declaration location' and supports pagination. While no annotations exist, the description implies a read-only analysis tool and does not contradict any known behaviors. It could mention non-destructiveness explicitly, but the context is sufficient.

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 concise with three sentences. The first sentence states the main purpose, the second provides context and distinction from siblings, and the third mentions output details. No unnecessary words or repetition.

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 (multiple filter options, pagination) and the presence of an output schema, the description covers all necessary aspects: purpose, usage guidance, output details, and alternatives. It is complete for an analysis tool.

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 input schema already provides detailed descriptions for each parameter (e.g., 'Path to the Solidity project directory', 'Maximum number of results to return'). The description adds only general mentions of filtering options like 'visibility, include/exclude constants and immutables', but does not provide additional semantic value beyond what the schema conveys.

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 'Analyzes state variables across the project or for a specific contract' and provides concrete use cases like 'auditing storage layout, finding public state, or understanding contract data.' It also distinguishes from a sibling tool by mentioning 'For storage slot layout, use get_storage_layout.'

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?

The description explicitly says when to use this tool (e.g., 'when auditing storage layout, finding public state, or understanding contract data') and when not ('For storage slot layout, use get_storage_layout'). It also mentions optional filtering capabilities, providing clear guidance.

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