gitlab_file_get
Read one GitLab file at a branch, tag, or commit, defaulting to the project default branch. Pass an MR source branch to view it as the merge request does; capped output flags truncation.
Instructions
Read one file from the repository at a ref. Defaults to the project default branch - pass ref= to read the file as the merge request sees it. Output is capped, and a truncated read says so.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | branch, tag or commit SHA; defaults to the project default branch | |
| path | Yes | repository-relative file path, e.g. 'src/app.ts' (no leading slash) | |
| project | Yes | project id ('42') or full path ('group/subgroup/app'); a path is URL-encoded for you | |
| maxChars | No | cap on returned characters; the file itself may be longer |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | ||
| url | No | ||
| path | Yes | ||
| size | Yes | characters returned, after truncation | |
| dryRun | No | ||
| content | No | ||
| truncated | Yes |