Skip to main content
Glama
mariusei

Scantool - File Scanner MCP

by mariusei

Scan Directory

scan_directory

Scan a directory to get a file tree with one-line gists, code health, and churn labels; supports reading file contents, outlines, and specific functions or classes.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
modeNobalanced
deltaNo
depthNo
callerNo
patternNo**/*
directoryYes
max_filesNo
output_formatNotree
exclude_patternsNo
include_metadataNo
respect_gitignoreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.26.0
    • addedInput schema / properties / ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Changed2 schema fields changedv0.23.0
    • addedInput schema / properties / caller
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / include_metadata
      Added value: +{
      +  "default": true,
      +  "type": "boolean"
      +}
  3. Changed1 schema field changedv0.20.1
    • addedInput schema / additionalProperties
      Added value: +false
  4. First observedv0.19.4

TDQS

B3.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 of behavioral disclosure, and it does substantial work: token-budget estimates per depth, elision marker '⟨…⟩ +N', tree output with code health and churn labels, and git-ref support via 'ref='. It does not mention side effects or permissions, but as a read-oriented scanning tool this is a minor gap rather than a fatal one.

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 front-loaded with the core concept, but it wanders into run-on sentences and repeats the directory-tree idea twice. The shell invocation is useful, but the overall paragraph would be clearer with bullets or separate sections for behavior, parameters, and usage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 12 parameters, no output schema, and no annotations, this description is not complete enough. It covers depth, ref, elision, and high-level output shape, but leaves many parameters undefined, and does not explain mode, output formats, filtering, or metadata options. An agent would still need to guess or probe to use the tool fully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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 12 parameters. It explicitly explains only depth and ref, and implies directory and directory-tree output. Parameters such as mode, pattern, delta, max_files, exclude_patterns, include_metadata, respect_gitignore, output_format, and caller are left completely undocumented. This is a significant semantic gap.

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 states what the tool produces: a skeleton of files with path:line, signatures/titles, and excerpts, or a directory tree with one-line gists. It also lists specific answerable questions (read file contents, outline a file, list functions/classes). However, it does not explicitly differentiate this tool from sibling tools like scan_file, scan_file_content, or preview_directory, so its boundary is slightly blurred.

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?

The description gives concrete use cases: reading file contents, outlining files, listing functions/classes, and reading a function by name. It also says 'Replaces Glob/ls for all file types,' which signals when to prefer it. It lacks explicit when-not-to-use guidance or alternatives relative to the sibling set, so it does not fully meet the highest bar.

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