Skip to main content
Glama

lint_solidity

Read-onlyIdempotent

Lint Solidity source code against your project's Solhint configuration or a supplied config object to catch rule violations.

Instructions

Lint a Solidity source string with the project or supplied Solhint config.

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

Input Schema

NameRequiredDescriptionDefault
codeYesSolidity source code to lint
configNoOptional complete Solhint config object

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuine behavioral context by note that the config falls back to the project's Solhint config when not supplied, but it says nothing about what findings are returned or how they are reported, which matters since there is no output schema.

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?

A single front-loaded sentence with zero filler; the scope (source string) and the config fallback are both packed in.

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?

The call itself is fully specified: what to pass, what happens without config, and that it is a safe read. The remaining gap is the return value, since no output schema exists and the description never hints at the diagnostics shape.

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%, so the baseline is 3, but the description adds real meaning to the optional config parameter by clarifying that omitting it uses the project config rather than producing an error or empty rule set.

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?

States a specific verb ('Lint') and resource ('Solidity source string'), which implicitly separates it from lint_file and lint_project, which operate on files and projects. It does not name those siblings, so the differentiation is inferred rather than explicit.

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 phrase 'source string' implies use when code is in memory rather than on disk, but the description never says when to prefer lint_file or lint_project, nor any prerequisites. Usage is implied, not stated.

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