summarize_file
Summarize files or directories using minimal tokens, extracting structure and content to reduce AI processing costs.
Instructions
Summarize a file or directory without reading every byte. Agents get full structural understanding in ~500 tokens instead of 50,000+.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to a file or directory. | |
| max_tokens | No | Total output budget in tokens. | |
| mode | No | "content" (summary of text), "structure" (tree only), "both". | both |
| file_extensions | No | Filter by extensions like [".py", ".md"] (directory only). | |
| max_depth | No | Directory traversal depth limit. | |
| model | No | Used for token counting. | gpt-4o |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||