Skip to main content
Glama

Merge Solidity imports

merge_imports

Merge a Solidity file and its imports into one source, returning it by default or writing it to a specified output path when requested.

Instructions

Merge a Solidity file and its imports with kritisi (sol-merger). By default the merged source is returned without touching any file; set output to write 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": {
      "path": "<path>"
    },
    "name": "merge_imports"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to a .sol file
outputNoOptional path for the merged source; no file is written when omitted
overwriteNoAllow replacing an existing output file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does meaningful work: it reveals the external dependency (kritisi/sol-merger) and, importantly, that the default behavior is non-destructive with file writes only occurring when output is supplied. It omits edge behaviors such as what happens on a missing input file, on parse failure, or when overwrite is needed.

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 tight sentences with zero filler, and the more important default (no file touched) is front-loaded before the opt-in write path.

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 three-parameter file-manipulation tool with no annotations and no output schema, the description covers what is produced ('the merged source') and when side effects occur, which is the critical information. What remains thin is failure/edge-case behavior and how output and overwrite interact when the target already exists.

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 all three parameters are already documented, including that no file is written when output is omitted. The description restates that default-vs-write relationship rather than adding new meaning such as overwrite preconditions or path resolution rules, so the baseline of 3 applies.

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 ('Merge a Solidity file and its imports') and even names the underlying implementation ('kritisi (sol-merger)'). It is clearly distinguishable in practice from siblings like natspec_document or security_audit, though it never explicitly contrasts itself with them.

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

Usage Guidelines4/5

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

It gives clear operating context: by default nothing is written and the merged source is returned; setting output writes it. That covers the primary usage decision (read-only merge vs. persist to disk), but it offers no exclusions or guidance about when a different sibling tool is the right choice.

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