File structure outline
outlineShow a file's structure—function/class names, imports, top-level comments—without implementation bodies; include git branch/commit metadata when available.
Instructions
Show the structural outline of a file — function/class names, top-level comments, imports. Returns a compact view without implementation bodies. Includes git metadata (branch, commit) when the file is in a git repo. Use instead of cat when reviewing file structure or auditing many files at once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Git ref to outline (e.g. 'main', 'HEAD~1', a commit hash). When set, reads file content from git (git show ref:path) instead of disk. | |
| path | Yes | Path to the file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| mtime | Yes | File modification time (unix timestamp). 0 if using ref. | |
| branch | Yes | Current git branch, or null if not in a git repo | |
| commit | Yes | Last commit hash that touched this file, or null if not in a git repo | |
| outline | Yes | ||
| symbols | Yes | ||
| language | Yes | ||
| retained | No | ||
| totalLines | Yes | ||
| outlineLines | Yes |