list_repo_contents
Browse GitHub repository directories to view file and folder structures with metadata like names, paths, types, and sizes.
Instructions
List contents of a directory in a GitHub repository.
USE THIS WHEN: You need to browse or explore the structure of a repository directory.
BEST FOR: Discovering what files and folders exist in a specific location.
Returns names, paths, types (file/dir), sizes for each item.
Common workflow:
1. Use github_repo_search() to find the repository
2. Use get_repo_tree() to see the overall structure
3. Use list_repo_contents() to browse specific directories
4. Use get_file_content() to read individual files
Args:
repo: Repository in format "owner/repo" (e.g., "psf/requests")
path: Path to directory (empty string for root, e.g., "src/utils")
Returns:
JSON with list of files and directories with metadata
Example: list_repo_contents("psf/requests", "requests") → Lists files in requests/ directory
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| path | No |