Skip to main content
Glama

rust_contract_audit

Audit Rust smart contracts for security vulnerabilities with automated framework detection. Analyzes source code or GitHub URLs and returns a severity-graded report with root cause analysis and fixes.

Instructions

Rust smart contract security audit powered by CottonmouthAI (Claude Opus). Auto-detects the framework (CosmWasm, Anchor/Solana, Stellar/Soroban, NEAR) and applies targeted checks: unsafe arithmetic, missing account validation, signer privilege escalation, PDA seed collisions, CPI reentrancy, storage layout bugs, and integer truncation. Returns a severity-graded report (Critical/High/Medium/Low) with root cause analysis and recommended fixes. Provide raw Rust source code or a GitHub URL. Cost: $2.00 via x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNo
github_urlNo
contract_nameNoContract

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full weight. It discloses that the tool is a non-destructive analysis returning a severity-graded report, includes cost ($2 via x402), and mentions required inputs (source code or GitHub URL). No contradictions with annotations (none present).

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 dense and informative, with the main purpose front-loaded. It includes details on framework detection, checks, output, and cost. While slightly verbose, it remains structured and efficient for the complexity of the tool.

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 frameworks, many checks), the description is comprehensive. It specifies input methods, auto-detection, types of vulnerabilities, report format, and cost. This fully contextualizes the tool for an agent.

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 description coverage is 0%, but the description compensates by indicating that 'source' and 'github_url' are accepted inputs. It does not explicitly describe the 'contract_name' parameter, but overall provides sufficient guidance for the main parameters.

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 performs Rust smart contract security audits, auto-detects frameworks (CosmWasm, Anchor/Solana, Stellar/Soroban, NEAR), and lists specific checks. This distinguishes it from siblings like 'smart_contract_audit' and 'move_contract_audit' by specifying language and framework support.

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 implies when to use (for Rust smart contracts) by naming frameworks and checks. It does not explicitly exclude other languages or mention alternatives, but the context of siblings and the focused description provide 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/Homie4570/lso-mcp'

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