File Content
get_file_contentRetrieves a specific file's content from a GitLab repository using project and file paths, supporting code analysis and review.
Instructions
Get the content of a specific file from a GitLab repository - crucial for code analysis
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": {
"projectPath": "<projectPath>",
"filePath": "<filePath>"
},
"name": "get_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Git reference (branch, tag, or commit SHA) | HEAD |
| filePath | Yes | Path to the file within the repository (e.g., "src/main.js") | |
| projectPath | Yes | Full path of the project (e.g., "group/project-name") | |
| userCredentials | No | Your GitLab credentials (optional — falls back to the configured env token if not provided) |