get_repository_tree
List files and directories in a GitLab repository, supporting recursive trees and keyset pagination for large projects.
Instructions
List files and directories in a repository
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The ID or URL-encoded path of the project | |
| path | No | The path inside the repository | |
| ref | No | The name of a repository branch or tag. Defaults to the default branch. | |
| recursive | No | Boolean value to get a recursive tree | |
| per_page | No | Number of results to show per page | |
| page_token | No | Token for keyset pagination. Use the next_page_token value returned in the previous response to retrieve the next page. | |
| pagination | No | Pagination method. Use 'keyset' for keyset-based pagination (required for repositories with many files). Non-keyset calls keep the legacy array response for backward compatibility; that legacy response shape is deprecated and may be removed in a future major release. Keyset calls return a structured response with items and next_page_token when more pages are available. |