Skip to main content
Glama

Scan EVM Vulnerabilities

evm_scan_vulnerabilities
Read-onlyIdempotent

Scan Solidity smart contracts for security vulnerabilities using Slither static analysis. Returns validated findings with severity, description, and code snippets.

Instructions

Run Slither static analysis on a Solidity contract and return schema-validated vulnerability findings.

Each finding includes the detector name, severity, description, source file, line numbers, and the actual code snippet extracted from the file system.

Args:

  • contractPath (string): Absolute path to the Solidity file or Foundry project root

  • severityFilter (string[], optional): Only return findings at these severities ("High" | "Medium" | "Low" | "Informational")

  • maxFindings (number, optional): Cap the number of findings returned (default: all)

  • detectors (string[], optional): Run only these Slither detector ids (e.g. ["reentrancy-eth", "arbitrary-send-eth"]) for a focused scan

Returns: JSON object: { "findings": [ { "check": string, // Slither detector id (e.g. "reentrancy-eth") "severity": string, // "High" | "Medium" | "Low" | "Informational" "description": string, // Human-readable explanation "file": string, // Relative path to the source file "lines": number[], // Affected line numbers (1-indexed) "code_snippet": string // Extracted source code from the file } ], "totalFindings": number, // Total before truncation/capping "truncated": boolean // true if findings were dropped to fit the response limit }

Examples:

  • "Audit src/Vault.sol for reentrancy" → contractPath = "/path/to/src/Vault.sol"

  • "Run security scan on my Foundry project" → contractPath = "/path/to/project"

  • "Only high-severity issues" → severityFilter = ["High"]

  • Do NOT use for gas analysis (use evm_analyze_gas_profile instead)

Error Handling:

  • Returns isError=true if the path does not exist or Slither is not installed/crashes

  • Returns empty findings array if no vulnerabilities found

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detectorsNoRun only these Slither detector ids
maxFindingsNoCap the number of findings returned
contractPathYesAbsolute path to the Solidity file or Foundry project root
severityFilterNoOnly return findings at these severities

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
findingsYes
truncatedYes
totalFindingsYes
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds context like 'schema-validated' and details on error handling, but does not contradict annotations.

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?

Well-structured with sections for args, returns, examples, and error handling. Every sentence adds value, though slightly lengthy; could be trimmed slightly without losing information.

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 output schema exists, the description fully explains return values and error behavior. It covers all necessary aspects for a tool with 4 parameters and moderate complexity.

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?

Schema coverage is 100% with descriptions for all 4 parameters. The description adds extra context beyond the schema (e.g., 'for a focused scan' for detectors, example usages), enhancing clarity without redundancy.

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 the tool runs Slither static analysis on Solidity contracts, returning vulnerability findings. It uses specific verbs and resource, and distinguishes from siblings like evm_analyze_gas_profile.

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?

Explicit guidance on when to use (e.g., 'Audit src/Vault.sol for reentrancy') and when not to ('Do NOT use for gas analysis (use evm_analyze_gas_profile instead)'). Includes examples and error handling.

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/0xendale/evm-agent-toolkit'

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