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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>"
},
"name": "gas_optimization"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | The full Solidity source code to review for gas savings. |