Scan File
scan_fileAnalyze a source file or directory to produce a structural skeleton with paths, line numbers, signatures, and condensed excerpts, aiding codebase exploration and AI-assisted development.
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. 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; ref= reads it at a git ref. May append a self-levelling CONNECTIVITY note (candidate dead/orphan/drift across the corpus, silent when clean). 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).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| mode | No | balanced | |
| delta | No | ||
| depth | No | ||
| focus | No | ||
| budget | No | ||
| caller | No | ||
| condense | No | ||
| file_path | Yes | ||
| output_format | No | tree | |
| show_complexity | No | ||
| show_decorators | No | ||
| show_docstrings | No | ||
| show_signatures | No | ||
| include_metadata | No |