gitlab_list_repository_tree
Explore and retrieve contents of a repository directory, including files and subdirectories, at a specified path and Git reference. Supports recursive traversal for detailed listings, aiding in project navigation.
Instructions
Browse repository file structure at a specific path and ref (branch/tag/commit). Returns file and directory listings with type, mode, and SHA. Supports recursive traversal option.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
path | No | Directory path in repository (string). Use forward slashes. Empty string for root. Example: 'src/components' | |
project_id | No | Project ID (integer) or path (string like 'group/project'). Optional - auto-detects from current git repository if not provided | |
recursive | No | Include subdirectories recursively (boolean). True = traverse all subdirectories. Default: false | |
ref | No | Git reference: branch name, tag name, or commit SHA. Optional - defaults to project's default branch (usually 'main' or 'master') |