Skip to main content
Glama

Solidity security audit

security_audit

Audit Solidity contracts to identify high, medium, and low severity issues, and optionally generate a PDF report.

Instructions

Audit a Solidity contract with kritisi and return high/medium/low findings. Optionally writes a PDF report. API keys are read from the environment or the kritisi user config, never from tool arguments.

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": {
      "path": "<path>"
    },
    "name": "security_audit"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to a .sol file
providerNoAI provider (default: openrouter)openrouter
outputPdfNoOptional PDF output path; no file is written when omitted
overwriteNoAllow replacing an existing PDF report
includeReportNoInclude the full findings JSON in the response

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the key side effect (optionally writes a PDF report) and the credential sourcing rule (environment or kritisi user config, never tool arguments), which are genuinely useful. It says nothing about the fact that contract source is sent to an external AI provider (a privacy/cost implication), nor about latency, rate limits, or failure modes, which are significant for an audit tool that makes metered third-party calls.

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?

Three short sentences, front-loaded with the core action, then the side effect, then the credential constraint. Nothing is redundant and no sentence merely repeats a structured field.

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?

With no output schema, the description does enough by naming the returned severity buckets and the includeReport toggle, and it flags the file-write side effect. It falls short of fully complete for a tool that calls an external AI provider, since cost, latency, and error behavior are unmentioned.

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%, so each of the five parameters (path, provider, outputPdf, overwrite, includeReport) is already documented in the schema, including the default provider and the no-write-when-omitted behavior for outputPdf. The description reinforces the optional-PDF behavior but adds no new meaning beyond what the schema states, making the baseline 3 correct.

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 names a specific verb and resource (audit a Solidity contract) plus the engine (kritisi) and the shape of the result (high/medium/low findings), which is far more than a restatement of the name. It does not explicitly differentiate from siblings, but the listed siblings (merge_imports, natspec_document, show_config) are unrelated operations, so the missing contrast costs little.

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 context needed to call it is implied: point at a .sol file and optionally request a PDF. There is no explicit when-to-use/when-not guidance, no statement of prerequisites beyond API key sourcing, and no advice on choosing a provider or on when to leave includeReport on.

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