get_file_at_ref
Retrieve file content at a specific branch, tag, or commit, with optional line slicing. Inspect historical code without cloning; binary files and files over 1 MB are rejected.
Instructions
Retrieves file content at a specific ref or commit, with optional line slicing. Use to inspect historical code without cloning. Rejects binary files and files exceeding 1 MB. Narrow with start_line and end_line.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or commit SHA (default: default branch / HEAD). | |
| path | Yes | File path inside repository. | |
| repo | Yes | Repository name. | |
| owner | Yes | Repository owner (organization or user). | |
| end_line | No | Optional 1-indexed ending line number. | |
| start_line | No | Optional 1-indexed starting line number. |