Skip to main content
Glama
trailofbits

Slither MCP Server

Official
by trailofbits

get_function_source

Retrieve the full source code of a specific Solidity function with line numbers to review implementation details after finding functions.

Instructions

Retrieves the source code of a specific function. Use this when you need to read the implementation details after finding a function with list_functions or search_functions. Returns the function body with line numbers. Requires the function's contract_key and full signature to uniquely identify the function.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYes
line_endNo
file_pathNoFile path relative to project directory
line_startNo
source_codeNo
error_messageNo
Behavior4/5

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

With no annotations provided, the description discloses that the tool returns the function body with line numbers, indicating the output format. It also implies a read-only operation by saying 'retrieves'. There is no mention of side effects, but the description is sufficiently transparent for a read-only tool.

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, each serving a distinct purpose: stating the action, suggesting when to use, and describing the output and requirements. 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?

Given the tool's simplicity and the presence of an output schema, the description is complete. It covers what, when, and the output format. It could mention the return type briefly, but the output schema likely covers that.

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?

The schema already includes detailed descriptions for each parameter (path, signature, contract_name). The description adds value by explaining that these collectively uniquely identify the function, which is not explicitly stated in the schema. The description uses the term 'contract_key' loosely, but the intention is clear.

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 it retrieves the source code of a specific function, with a specific verb ('retrieves') and resource ('source code of a specific function'). It distinguishes from sibling tools like list_functions and search_functions by explicitly stating its purpose of reading implementation details after those discovery tools.

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 advises to use this tool after finding a function with list_functions or search_functions, providing clear context for when to invoke it. It does not explicitly mention when not to use it, but the guidance is still strong and actionable.

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