GitHub file
github_fileRead one file from a GitHub repository at a branch, tag, or commit, returning UTF-8 text plus SHA, size, and truncation details.
Instructions
Read one file at a ref. Returns UTF-8 text when possible, never binary bytes, and reports sha, size, and truncation.
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": {
"repo": "<repo>",
"path": "<path>"
},
"name": "github_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or commit; defaults to the repository default branch | |
| path | Yes | File path inside the repository | |
| repo | Yes | Repository in owner/name form | |
| fresh | No | Bypass the local cache | |
| end_line | No | Last line to return, inclusive; defaults to the file end | |
| start_line | No | First line to return, 1-based; defaults to 1 |