Skip to main content
Glama
mariusei

Scantool - File Scanner MCP

by mariusei

Preview Directory

preview_directory

Get a codebase overview: size, language mix, entry points, and hot functions. Use this to orient yourself in an unfamiliar project before targeted exploration.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
partNo
depthNodeep
directoryYes
max_filesNo
max_entriesNo
respect_gitignoreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.28.0
    • addedInput schema / properties / part
      Added value: +{
      +  "default": "",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.20.1
    • addedInput schema / additionalProperties
      Added value: +false
  3. First observedv0.19.4

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the burden. It discloses the output length (~3-5k tokens), the format (line one lists parts with line counts), and that it fetches one part alone via the 'part' parameter. It also reveals that the tool runs a shell command (sct) and provides the fallback invocation. This is helpful but does not disclose side effects (likely read-only) or error handling, which is acceptable for an orientation tool.

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

Conciseness4/5

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

The description is moderately sized and front-loads the core purpose. It is structured into a few sentences covering orientation, output format, use cases, and shell invocation. Some redundancy (e.g., repeating the fallback command) but generally efficient.

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 (6 params, no schema coverage, no output schema), the description provides a reasonable overview: output length, parts list, use case, and shell command. It lacks detailed parameter explanations (e.g., depth values) but provides enough to get an agent started. For an orientation tool that typically uses defaults, this is sufficient.

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. It explains the 'part' parameter (to fetch one part alone) and mentions depth, max_files, max_entries implicitly through limits. However, it does not explain the exact semantics of depth (deep vs shallow), max_entries, or respect_gitignore beyond what the schema field names imply. The description adds minimal value for parameters beyond the schema.

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 the tool provides an orientation overview of a codebase, including size, language mix, entry points, hot functions, and a call-graph map. This distinguishes it from sibling tools like scan_directory (which likely does a file tree scan) and list_directories (which lists directories). However, the description is somewhat abstract and could be more explicit in stating it previews a directory's structure and statistics.

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 explicitly states when to use this tool: for first-time orientation of an unknown codebase, not for targeted questions. It also contrasts with the file tree (which is the tier below via scan). It does not name a specific sibling alternative but implies that scan_directory is for the tree. This is clear guidance for typical use cases.

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