Skip to main content
Glama
mariusei

Scantool - File Scanner MCP

by mariusei

Scan Diff

scan_diff

Compare commits, branches, or working tree to HEAD with structural per-function diffs. See added, changed, renamed, removed files and functions, plus a review tail for pull requests.

Instructions

Structural diff between refs. One ref = that ref vs the working tree. Two refs = A...B against their merge-base by default (--no-merge-base compares the tips; a note says which). Per file: + added, ~ changed (signature: old → new; or body: N code / M doc lines), = renamed (paired by identical body; children follow a renamed class), - removed; identical signature deltas in 3+ functions fold into one row; new files as skeletons; a + or ~ function says how many other changed functions call it. The coverage line counts files changed without structural rows and names the reason for each. --review appends candidate dead/orphan/drift the changed files introduced; off by default on both doors. ref vs the working tree, or ref vs ref2; review=True appends the review tail. Use instead of git diff for review and 'what changed' questions. Answers: what changed between two commits or branches, per function; review the changes of a pull request or branch; local changes against HEAD, as structures rather than lines. In your shell: sct diff <ref> or sct diff <refA> <refB> (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoHEAD
ref2No
budgetNo
reviewNo
directoryYes
no_merge_baseNo
output_formatNotree

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.26.0
    • addedInput schema / properties / no_merge_base
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedInput schema / properties / output_format
      Added value: +{
      +  "default": "tree",
      +  "type": "string"
      +}
    • addedInput schema / properties / ref2
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / review
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv0.20.1
    • addedInput schema / additionalProperties
      Added value: +false
  3. First observedv0.19.4

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses substantial behavioral details: the default merge-base behavior, the --no-merge-base alternative, per-file change categories (+/~/=/-), folding of identical signature deltas, skeleton files, coverage line behavior, and the --review flag being off by default. It doesn't mention performance or error behavior, but the disclosed behavior is rich and specific.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is information-dense and front-loaded with the core diff semantics, but it is long and somewhat stream-of-consciousness. The shell command example at the end is useful but the sentence 'ref vs the working tree, or ref vs ref2; review=True appends the review tail' partially repeats earlier content. Every sentence carries information, but the structure could be tightened.

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?

Given the tool's complexity (7 params, no output schema, no annotations), the description is quite complete. It explains the diff modes, per-file change categories, the coverage line, the review feature, and provides shell usage. It doesn't document budget or output_format, but the core semantics an agent needs to select and invoke the tool are present.

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 description coverage is 0%, so the description must compensate. It explains the core ref/ref2 semantics ('One ref = that ref vs the working tree', 'Two refs = A...B against their merge-base'), the review flag ('--review appends candidate dead/orphan/drift'), and no_merge_base ('--no-merge-base compares the tips'). It doesn't explicitly explain budget or output_format, but the most critical parameters are covered.

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?

The description clearly states the tool performs a structural diff between refs, with specific verbs and resources: 'Structural diff between refs', 'One ref = that ref vs the working tree', 'Two refs = A...B against their merge-base'. It distinguishes itself from git diff and sibling tools by focusing on per-function structural changes rather than line-level diffs.

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 explicitly says when to use it: 'Use instead of git diff for review and what changed questions' and lists concrete use cases: 'what changed between two commits or branches, per function; review the changes of a pull request or branch; local changes against HEAD'. It also provides shell command examples with sct diff, which is actionable guidance.

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