get_file_contents
Fetch file or directory contents from a GitLab repository by providing owner, repo, path, and optional branch.
Instructions
Get the contents of a file or directory 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": {
"owner": "<owner>",
"repo": "<repo>",
"path": "<path>"
},
"name": "get_file_contents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file or directory | |
| repo | Yes | Project path/name (e.g. 'pro-portal-onboarding-and-retention') | |
| owner | Yes | Project namespace/path (e.g. 'pro/portal/frontends') or numeric Project ID | |
| branch | No | Branch to get contents from |