read_repository_file
Access file contents directly from a GitLab repository by providing the project ID and file path, with optional branch or commit reference.
Instructions
Read the content of a specific file from a GitLab 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>",
"file_path": "<file_path>"
},
"name": "read_repository_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project ID or path (e.g., 'username/repo-name') | |
| file_path | Yes | Path to the file to read | |
| ref | No | Branch, tag, or commit SHA | main |