get_file_contents
Retrieve file or directory contents from a GitLab project by specifying the project, path, and optional branch, tag, or commit reference.
Instructions
Get contents of a file or directory from a GitLab project.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_file_contents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch/tag/commit to get contents from | |
| path | No | Alias of file_path | |
| jmespath | No | Optional JMESPath expression filtering the JSON result before return. | |
| file_path | No | Path to the file or directory. Takes precedence over 'path' when both are provided | |
| project_id | No | Project ID or URL-encoded path (optional; falls back to env) |