Skip to main content
Glama
uitkhoanna

solidity-auditor-mcp

by uitkhoanna

gas_optimization

Analyze Solidity source code and receive ordered gas-saving suggestions with estimated savings, including storage packing and loop optimizations.

Instructions

Run a gas optimization review of a Solidity source file. Returns a list of concrete, ordered gas-saving suggestions (storage packing, calldata vs memory, immutable/constant, loop optimizations, short-circuiting, etc.) with estimated savings where possible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesThe full Solidity source code to review for gas savings.
Behavior4/5

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

No annotations exist, so the description fully bears the burden. It details the output (ordered list with estimated savings) and lists optimization types (storage packing, loop optimizations, etc.). This goes beyond basic purpose, though it doesn't mention side effects or limitations.

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 two sentences with no fluff. It front-loads the action and includes relevant details about the output. Every sentence adds value.

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 (one parameter, no output schema), the description covers the main functionality and output characteristics. It could mention output format or version constraints, but it is still fairly complete and distinct from sibling tools.

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% for the single parameter 'source', so baseline is 3. The description adds context by indicating the source is reviewed for gas savings and that the output is a list of suggestions, enhancing understanding of the parameter's role.

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 performs a gas optimization review of a Solidity source file and returns ordered suggestions. It is specific about the resource (Solidity source) and distinguishes from sibling tools like audit_contract (broader audit) and check_vulnerability (security).

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 implies usage for gas optimization but does not explicitly state when to use this tool over siblings or when not to use it. An agent can infer context from sibling names, but no direct guidance is provided.

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/uitkhoanna/my-contract-mcp'

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