Skip to main content
Glama
mariusei

Scantool - File Scanner MCP

by mariusei

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
preview_directoryA

No command on a directory = orientation: size and language mix, entry points, hot functions, the call-graph map (~3-5k tokens; for first-time orientation of an unknown codebase, not for targeted questions). Line one lists the answer's parts with their line counts and the form that fetches one part alone. The file tree is the tier below (scan). Answers: an overview of a codebase or repository; where to start in an unfamiliar project; entry points and the most-called functions. In your shell: sct <dir> (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

list_directoriesC

Skeleton of files or a directory: every structure with path:line, signature or title, a condensed excerpt within the budget. A directory gives the tree with one-line gists. --depth quick is about 300 tokens per file, normal 1500, deep everything with module values whole (files only). Elided content is marked ⟨…⟩ +N; focus reads it. Folders only, no files: the directory hierarchy. Answers: read a file's contents; outline of a file; list the functions and classes in a file; read or show the source of one function, method or class by name. In your shell: sct --help (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

scan_file_contentA

Skeleton of files or a directory: every structure with path:line, signature or title, a condensed excerpt within the budget. A directory gives the tree with one-line gists. --depth quick is about 300 tokens per file, normal 1500, deep everything with module values whole (files only). Elided content is marked ⟨…⟩ +N; focus reads it. Content given directly (remote files, APIs, a git blob, stdin), same budget/depth and focus as scan_file. Answers: read a file's contents; outline of a file; list the functions and classes in a file; read or show the source of one function, method or class by name. In your shell: sct scan - --as <path> or sct focus - --as <path> <name> (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

scan_fileA

Skeleton of files or a directory: every structure with path:line, signature or title, a condensed excerpt within the budget. A directory gives the tree with one-line gists. --depth quick is about 300 tokens per file, normal 1500, deep everything with module values whole (files only). Elided content is marked ⟨…⟩ +N; focus reads it. One file; budget=1500 for exploration, 300 for a quick look; focus='name' (or 'Class.method') reads one node verbatim instead of guessing line ranges, body_only=True without the parent context; ref= reads it at a git ref. May append a self-levelling CONNECTIVITY note (candidate dead/orphan/drift across the corpus, silent when clean). Answers: read a file's contents; outline of a file; list the functions and classes in a file; read or show the source of one function, method or class by name. In your shell: sct scan <path> or sct focus <path> <name> (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

scan_directoryB

Skeleton of files or a directory: every structure with path:line, signature or title, a condensed excerpt within the budget. A directory gives the tree with one-line gists. --depth quick is about 300 tokens per file, normal 1500, deep everything with module values whole (files only). Elided content is marked ⟨…⟩ +N; focus reads it. A directory: the file tree with one-line gists per file, code health and churn labels; ref= reads it at a git ref. Replaces Glob/ls for all file types. Answers: read a file's contents; outline of a file; list the functions and classes in a file; read or show the source of one function, method or class by name. In your shell: sct scan <dir> (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

scan_diffA

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).

find_divergenceA

Peer divergence across a directory: functions that break a call pattern their siblings follow (peers calling X also call Y, this one does not). A review hint, not a verified bug list; silent on a consistent codebase, and that silence is the answer. Answers: functions that break a pattern their siblings follow; likely missed calls, as a review hint. In your shell: sct --help (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

search_structuresA

Text across a directory (or one file) with structural context: each hit shows its enclosing structure, plus leads to where matched names are defined; when no lead exists it says so. --names matches structure names instead of text; an empty answer names the paths that match and what the other reading finds (the pattern as text, or as names). The pattern is a Python regex; grep's \| is read as alternation with a note. --type filters which structures are reported; --decorator RE (with --names) keeps structures with a matching decorator and answers one row per structure, decorators on the row. 40 structures per page, --limit/--offset for the rest, and the page is stated. content_pattern finds text with its enclosing function/class/section plus leads to definitions; name_pattern/type_filter/has_decorator find structures; ref= searches at a git ref. Best first call for a targeted question; use instead of Grep. Answers: find where a function or class is defined; find text in code across files. In your shell: sct search <dir> <pattern> (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

surfaceA

The public surface of a package directory at a ref: every exported name with its signature, how it is exported and where it is defined. Each language applies its own rule: Python's all, lazy tables and re-export chains; Rust's pub and lib.rs re-exports; TypeScript's index exports; Go's exported identifiers; visibility keywords elsewhere; a namespace or module is looked through. --against REF prints the surface diff; the header states the direction (A → B) and names its parts (added, changed, moved, removed) with line counts; --part ID prints one part alone. Answers: the public API of a package or module; exported names and where each is defined; API changes between two versions. In your shell: sct surface <package-dir> or sct surface <package-dir> --against REF (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

overlapA

N branches against one base, each at its own merge-base: structures touched by 2+ branches (marked base(~/+/-) when the base itself changed them since the branches forked), new names introduced independently by 2+ branches, commits two branches share (a stack: overlap between them is expected; the residual beyond their shared commits is what stays), and per branch whether it is already in the base and by which criterion (ancestor / patch-equivalent / tree-equal; patch-equivalence proves it can be deleted, not that its content is in the current tree). Ends with a merge-order hint, not a verdict. The first line names the parts (branches, history, shared, colliding, order) with line counts; --part ID prints one part alone. Answers: do branches conflict or change the same functions; in which order to merge several branches; which commits two pull requests share. In your shell: sct overlap <base> <branch>... (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

callersA

Actual call sites of a function or method across a directory, never a mention in prose, a comment, a docstring or a string literal; each with its enclosing function and path:line, the definition(s) first. A qualified name (Class.method) narrows the definitions; which definition a site binds to is not resolved, and the answer says so. Given a file instead of a name, the files that import it with the import line, from the same statically resolved import graph as the preview's used by. Answers: who calls this function; find usages and references of a function or method; which files import this file. In your shell: sct callers <name> or sct callers <name> --dir <dir> (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

historyA

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).

resolveA

Translate path:line or path::name from one ref to another: the enclosing structure with start and end at --from, and where it is at --to (same place, renamed with an identical body, or gone, with the nearest names). Answers: where a line or function is at another commit; map a line number from one commit to another. In your shell: sct resolve <path:line> --from REF or sct resolve <path::name> --from REF --to REF (if sct is not on PATH, "/app/.venv/bin/python" -m scantool.cli replaces sct).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.2/5.0

Scored across 13 tools

Disambiguation2/5

Several tools overlap heavily: list_directories, scan_file, scan_file_content, and scan_directory all produce structural skeletons with nearly identical descriptions, differing only in input source (file vs. content vs. directory). This makes it ambiguous which tool to select for a given task. Other tools like preview_directory and scan_diff are distinct, but the core scanning set lacks clear boundaries.

Naming Consistency3/5

Naming mixes verb_noun patterns (preview_directory, scan_file, search_structures) with single verbs (resolve, surface, overlap) and bare nouns (callers, history). While names are readable and snake_case throughout, there is no uniform verb-first convention, and tools like list_directories vs. scan_directory feel arbitrarily differentiated.

Tool Count4/5

With 13 tools, the count is within the ideal 3–15 range and covers a wide range of code analysis tasks (scanning, diffing, searching, history, callers, etc.). However, some tools are redundant (e.g., list_directories and scan_directory), so the count could be trimmed without losing functionality.

Completeness4/5

The server covers a comprehensive set of operations: previewing, scanning files/directories/content, structural diffs, divergence detection, targeted search, public surface analysis, branch overlap, callers, and history. This appears to cover the domain of code structure exploration well, with only minor gaps like a dedicated tool for raw file metadata or multi-file rename detection.

Maintenance

ActivityActive
ResponsivenessNo issues