Scan File
scan_fileScan any source file to extract its structure—functions, classes, methods, and line numbers—for quick codebase exploration.
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, 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).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| mode | No | balanced | |
| delta | No | ||
| depth | No | ||
| focus | No | ||
| budget | No | ||
| caller | No | ||
| condense | No | ||
| body_only | No | ||
| file_path | Yes | ||
| output_format | No | tree | |
| show_complexity | No | ||
| show_decorators | No | ||
| show_docstrings | No | ||
| show_signatures | No | ||
| include_metadata | No |