repo_tree
Explore the file tree of a GitHub repository with recursive listing, depth control, glob filtering, and automatic exclusion of noise directories. Understand project layout before reading files.
Instructions
View the file tree of a GitHub repository or subdirectory. Recursive listing with depth control (1-3 levels), glob pattern filtering (e.g. *.py), and optional file sizes. Automatically filters noise directories (node_modules, pycache, .venv, dist, etc.). Use to understand project layout and discover key files before reading them with get_file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository in 'owner/name' format (e.g. 'modelcontextprotocol/python-sdk'). | |
| path | No | Subdirectory to start from. Empty = root. | |
| ref | No | Branch, tag, or commit SHA. Defaults to the default branch. | |
| depth | No | How many levels deep to show (1-3). | |
| pattern | No | Glob filter for filenames (e.g. *.py). Dirs always shown. | |
| show_sizes | No | Include file sizes in the output. |