Skip to main content
Glama

fix_file

DestructiveIdempotent

Applies Solhint autofixes to a single Solidity file, previewing changes by default and saving them only when write is true.

Instructions

Apply Solhint autofixes to one Solidity file. Previews the result by default; pass write: true to save it.

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": {
      "filePath": "<filePath>"
    },
    "name": "fix_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
writeNoWrite the fixed source back to the file. Defaults to false (preview only).
filePathYesPath relative to the project root

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, and the description usefully qualifies that risk by explaining the default is a non-writing preview and only write:true mutates on disk — context the annotations alone cannot convey. It stops short of saying what is overwritten, which Solhint config/rules apply, or whether unrelated formatting is touched.

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?

Two sentences, zero padding, with the primary action first and the safety-relevant default/write distinction immediately after. Every clause carries information an agent needs.

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?

For a 2-parameter tool with no output schema and annotations that already cover safety, the essentials (what it fixes, preview-by-default, write opt-in) are present. The main remaining gap is what the preview actually returns, which matters for deciding whether to follow up with write:true.

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 coverage is 100% and both parameters are documented, including the write default, so the description's "pass write: true to save it" is largely a restatement. Baseline 3 applies since the schema does the heavy lifting and no extra syntax or constraint detail is added.

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?

"Apply Solhint autofixes to one Solidity file" names a specific verb (autofix), a specific engine (Solhint), and a scope (one file). It does not distinguish itself from the sibling fix_solidity, so an agent must guess between the two by name alone.

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?

It clearly states the default mode (preview) and the opt-in flag for persistence, which is genuine invocation guidance. However, it never says when to prefer this over fix_solidity, or whether to run lint_file/lint_solidity first, which is the more consequential routing decision.

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