Skip to main content
Glama
mariusei

Scantool - File Scanner MCP

by mariusei

History

history

Trace a function or class through commit history, following renames and file moves, to show which commits changed it and when.

Instructions

One structure followed backwards through the commits that touched its file: a signature or body change, a rename (paired by identical body, the earlier name followed), the commit that introduced it; a file move is followed. Commits that touched the file but not the structure are counted, not listed. What git log -L gives for a line range, keyed on the structure. Answers: which commits changed this function or class, and when; git log or git blame for one function; how a function evolved across commits. In your shell: sct history <path::name> or sct history <path:line> --ref REF (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
repoNo
locationYes
output_formatNotree

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.26.0

TDQS

A3.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it delivers. It explains precisely how the traversal works: signature/body changes are followed, renames are paired by identical body, file moves are followed, and commits touching the file but not the structure are counted but not listed. This is rich behavioral detail far beyond a generic 'history' statement.

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 dense and includes valuable information like rename handling, file moves, and the Python fallback command, but the first sentence is grammatically awkward and hard to parse: 'One structure followed backwards through the commits that touched its file: ...' The structure is not front-loaded or scannable; the core purpose takes several sentences to emerge clearly.

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 that there is no output schema and no annotations, the description provides a surprisingly complete picture: it explains what is followed, what is counted vs listed, and gives both common invocation forms including a fallback for when `sct` is not on PATH. It falls short only by not describing the output format (`tree` default) or the `repo` parameter, but the core usage context is well covered.

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 0%, so the description must compensate for the schema's silence. It does partially explain the `location` parameter through examples (`<path::name>` and `<path:line>`) and shows how to pass `--ref REF`. However, it does not explain `repo` or `output_format` at all, leaving 2 of 4 parameters undocumented in both schema and description.

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 clearly identifies the tool's purpose: track a code structure (function/class) backwards through commits, answering 'which commits changed this function or class, and when.' It uses a specific verb ('followed backwards') and a specific resource ('structure'), and the use-case list helps distinguish it from generic git/history tools. However, it does not explicitly distinguish itself from sibling tools like find_divergence or scan_diff, so it is not a 5.

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 description gives concrete use cases: 'which commits changed this function or class, and when; git log or git blame for one function; how a function evolved across commits.' This implies when to use the tool, but it does not state when not to use it or compare it with sibling tools. It offers shell invocation examples, which helps, but the usage guidance remains implicit rather than explicit.

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