Skip to main content
Glama
blockhertz-mcp

blockhertz-mcp

Official

gas

Analyze Solidity smart contracts for execution-cost inefficiencies and return an optimized version to lower transaction fees.

Instructions

Analyze a Solidity smart contract for gas inefficiencies and return an optimized version.

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": {
      "code": "<code>"
    },
    "name": "gas"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe Solidity smart contract source code to optimize

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. It discloses only that an optimized version is returned; it says nothing about whether the contract is stored or modified server-side, whether there are code size or length limits, what the output form is (full rewritten contract vs. diff), or what happens on invalid Solidity.

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?

One sentence, front-loaded with the verb and the resource, with zero filler. Nothing in it could be removed without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description should compensate for tool complexity but only partly does. The return shape, input limits, and failure behavior are unstated, leaving meaningful gaps for an agent invoking a code-transformation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single 'code' parameter, so the schema already explains it as the contract source to optimize. The description adds no syntax, size, or format guidance beyond that, which is the expected baseline when the schema does the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource — analyze a Solidity smart contract — narrowed by a concrete focus (gas inefficiencies) and an outcome (return an optimized version). That is far more than the bare name 'gas' conveys. It stops short of distinguishing itself from the sibling 'audit', so an agent must guess which analysis to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit statement of when to use this versus the sibling 'audit', and no exclusions or prerequisites. The gas-optimization framing implies a use case, but the agent is left to infer that security review belongs elsewhere.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools