Skip to main content
Glama

fix_solidity

Read-onlyIdempotent

Applies Solhint autofixes to a Solidity code string and returns the corrected source without modifying any files.

Instructions

Apply Solhint autofixes to a Solidity source string and return the corrected source. Does not touch any file.

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": "fix_solidity"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesSolidity source code to fix
configNoOptional complete Solhint config object

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.5/5.0
Behavior4/5

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

While annotations cover readOnlyHint and destructiveHint, the description adds the key behavioral constraint that the operation is memory/string-based rather than filesystem-based. This is important context for a modification tool.

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 definition is extremely concise. Every sentence is direct, active, and serves to define the tool's scope or function without filler.

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?

With 100% schema coverage and annotations clearly defining safety and constraints, the description effectively wraps the functionality, leaving no critical gaps for an agent to successfully invoke the 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?

The schema coverage is 100%, establishing a baseline of 3. The description does add context by specifying that the output will be the 'corrected source,' clarifying the outcome of the input 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?

It uses a specific action (Apply Solhint autofixes) on a specific resource (Solidity source string). It clearly distinguishes itself from 'lint_solidity' and file-based tools like 'fix_file'.

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?

The description provides an explicit operational boundary: it works on source strings and 'Does not touch any file,' which is a critical piece of usage guidance for an agent.

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