List a directory at a ref
list_treeList files and subdirectories in a GitLab repository at a branch, tag, or commit without checking out code. Enable recursive mode to walk the full subtree and see file sizes.
Instructions
List the files and subdirectories at a given ref, one level deep by default; set recursive to walk the whole subtree. Files carry their size in bytes, so you can tell a small config from a bundle before reading it. Names are full paths relative to the repository root. Give either url — a GitLab tree link — or ref (and optionally path). Everything comes from git, so no file is fetched to answer this. If the copy cannot be refreshed, the cached copy answers and the result says the refresh failed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or commit SHA, e.g. 'develop' or 'fix/PROJ-7608'. Required unless `url` is given. | |
| url | No | A GitLab tree link, e.g. 'https://gitlab.example.com/group/repo/-/tree/develop/src'. Replaces ref, path and (usually) project; the host must be GITLAB_HOST. | |
| path | No | Directory inside the repository, forward slashes, e.g. 'src'. Defaults to the repository root. | |
| project | No | GitLab project path, e.g. 'group/subgroup/repo'. Defaults to GITLAB_DEFAULT_PROJECT, or to the URL's project. | |
| recursive | No | List every file in the subtree instead of just the immediate children (files only). | |
| max_entries | No | Maximum entries to return (default 200). |