Skip to main content
Glama
mariusei

Scantool - File Scanner MCP

by mariusei

Surface

surface

Inspect a package's public API by listing every exported name with signature, export method, and definition location. Compare against another ref to see the API diff.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
againstNo
package_dirYes
output_formatNotree

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.26.0

TDQS

A3.6/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. It does this well by explaining language-specific export rules, namespace/module traversal, and that --against produces a diff with direction in the header. It does not mention output_format behavior or failure modes, but it provides substantial behavioral detail beyond a vague summary.

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 front-loaded with the core purpose, then adds language-specific context, diff mode, and shell usage. Its four sentences each add meaningful information, though the opening sentence is dense and the command examples could be more compact.

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

Completeness3/5

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

For a tool with four parameters, no annotations, and no output schema, the description provides a strong semantic overview and even details the return content (names, signatures, export style, definition location). However, it omits explicit documentation for output_format and ref parameter mapping, leaving some ambiguity for a complex tool.

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?

Because schema description coverage is 0%, the description must compensate for missing parameter documentation. It explains package_dir through the shell command, against through --against REF, and ref through 'at a ref', but it never explains the output_format parameter or enumerates its possible values. This is partial compensation with clear gaps.

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's function: it shows the public surface of a package directory at a ref, listing every exported name with its signature, export style, and definition location. This is specific enough to distinguish it from sibling tools like list_directories or scan_directory, though it does not explicitly name an alternative to contrast against.

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 shell invocations and explains the --against REF diff mode, so an agent can understand how to run it. However, it does not explicitly state when to prefer this tool over siblings such as scan_diff, overlap, or scan_directory, leaving the decision to inference.

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