github_get_file
Read a text file from a GitHub repository at a branch, tag, or commit. Long files are truncated and flagged, making repository file inspection clear.
Instructions
Read a text file. Long files are cut and flagged truncated. For a directory use github_list_directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag or commit sha. Defaults to the repo's default branch. | |
| path | Yes | ||
| repo | No | Repository as 'owner/name'. Defaults to GITHUB_MCP_DEFAULT_REPO when omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| path | Yes | ||
| size | Yes | ||
| content | Yes | ||
| truncated | Yes |