get_repo_tree
Retrieve the complete file structure of a GitHub repository to understand project layout, locate specific files, or obtain a full directory listing with paths, types, and sizes.
Instructions
Get the full file tree of a GitHub repository.
USE THIS WHEN: You need to see the overall structure and organization of a repository.
BEST FOR: Understanding project layout, finding specific files, or getting a complete directory listing.
Returns all file paths, types (file/directory), and sizes in a single call.
Use recursive=True for complete tree (all files in all subdirectories).
Use recursive=False for just top-level overview (faster, less data).
After getting the tree, use:
- get_file_content() to read specific files you identified
- list_repo_contents() to browse specific directories in detail
Args:
repo: Repository in format "owner/repo" (e.g., "psf/requests")
recursive: Whether to get full tree recursively (default False)
max_items: Maximum number of items to return (default 1000)
Returns:
JSON with complete file tree structure, branch, and count
Example: get_repo_tree("psf/requests", recursive=True) → Returns complete file listing
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| recursive | No | ||
| max_items | No |