github_get_file
Read a file's contents from a GitHub repository at a given branch, tag, or commit SHA to inspect source code or configuration without cloning the repo.
Instructions
Read a file's contents from a GitHub repository at a given ref.
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": {
"path": "<path>"
},
"name": "github_get_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or commit SHA. Defaults to the default branch. | |
| path | Yes | Path to the file within the repo, e.g. src/index.ts | |
| repo | No | ||
| owner | No |