get_repository_tree
List files and directories in a GitLab repository, optionally by path, branch or tag, and recursive traversal, to inspect repository structure.
Instructions
List files and directories in a repository.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>"
},
"name": "get_repository_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch or tag. Defaults to the default branch. | |
| page | No | Offset page number from 1 (items + next_page) | |
| path | No | Path inside the repository | |
| jmespath | No | Optional JMESPath expression filtering the JSON result before return. | |
| per_page | No | Items per page | |
| recursive | No | Recursive tree | |
| page_token | No | Keyset token from the previous next_page_token | |
| pagination | No | Use keyset for large trees (items + next_page_token). Omit both page and pagination for the legacy array (deprecated). | |
| project_id | Yes | Project ID or URL-encoded path |