Skip to main content
Glama
trailofbits

Slither MCP Server

Official
by trailofbits

get_inherited_contracts

Retrieves the upward inheritance tree of a Solidity contract to identify parent contracts and trace inherited functions.

Instructions

Gets the inheritance tree of parent contracts (upward traversal). Use this when understanding what a contract inherits, finding the source of inherited functions, or analyzing the inheritance hierarchy. Returns a recursive tree structure with parent contracts and their parents. Set max_depth to limit traversal depth; returns truncated flag if depth exceeded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYes
truncatedNoTrue if the tree was truncated due to max_depth limit
contract_keyYes
error_messageNo
full_inheritanceNo
Behavior5/5

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

The description discloses behavioral traits: returns a recursive tree structure, uses max_depth to limit traversal, and returns a truncated flag if depth exceeded. No annotations are present, so the description fully carries the burden.

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?

Three concise sentences: purpose, usage guidelines, and behavioral details with parameter hint. No unnecessary words.

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?

The tool has moderate complexity with a single required object parameter. Description explains output type (recursive tree) and truncation behavior. No annotations provided, but output schema exists. Some minor gaps (e.g., exact output structure) are covered by schema.

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% (the free text does not describe parameters), but the description adds value for max_depth by explaining its effect. The schema itself provides parameter descriptions, but the tool description could be enhanced by mentioning path and contract_key.

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 'Gets the inheritance tree of parent contracts (upward traversal)', specifying the verb, resource, and direction. It distinguishes from sibling 'get_derived_contracts' which provides downward traversal.

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 explicitly states when to use the tool: 'when understanding what a contract inherits, finding the source of inherited functions, or analyzing the inheritance hierarchy.' It does not explicitly mention when not to use, but the context of siblings implies alternatives.

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