Skip to main content
Glama
trailofbits

Slither MCP Server

Official
by trailofbits

find_dead_code

Identify uncalled functions (dead code) in Solidity contracts to clean up unused code or improve code coverage. Supports filtering by entry points, inherited functions, and test frameworks.

Instructions

Finds functions with no callers (potential dead code). Use this during code cleanup, auditing for unused code, or understanding code coverage. Can exclude known entry points (external/public functions), test framework functions, and inherited functions. Returns uncalled functions with their metadata. Some functions may be called dynamically and not detected. 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_countYes
error_messageNo
dead_functionsYes
Behavior4/5

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

No annotations are provided, so the description fully bears the burden. It discloses that the tool returns uncalled functions with metadata, supports pagination, and has a false negative limitation for dynamic calls. This goes beyond the input schema and provides useful behavioral context.

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 five sentences covering purpose, usage, capabilities, return, limitation, and pagination. It is well-structured and front-loaded with the core purpose, though it could be slightly more concise.

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 dead code analysis and the presence of an output schema, the description adequately covers key aspects: purpose, usage, limitations, and pagination. It lacks prerequisites (e.g., project must compile) but is otherwise sufficient.

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 description coverage is 0% (though the schema itself includes parameter descriptions). The description adds context for some parameters (exclude_entry_points, exclude_test_frameworks, include_inherited, pagination) but does not cover contract_key or exclude_paths. It adds moderate value beyond the schema.

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 uses the specific verb 'Finds' and the resource 'functions with no callers (potential dead code)', clearly distinguishing it from sibling tools like get_function_callers or run_detectors. The purpose is immediately clear.

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 states when to use the tool ('code cleanup, auditing, understanding coverage') but does not explicitly mention when not to use it or provide alternatives from the sibling list. It does note a limitation (dynamic calls not detected), which offers some 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