github_get_file
Retrieve the contents of a file from a GitHub repository by specifying owner, repo, and file path. Optionally target a specific branch, tag, or commit SHA.
Instructions
Get the contents of a file from a GitHub repository.
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": {
"owner": "<owner>",
"repo": "<repo>",
"path": "<path>"
},
"name": "github_get_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag, or commit SHA (defaults to default branch) | |
| path | Yes | File path within the repo, e.g. 'src/index.ts' | |
| repo | Yes | ||
| owner | Yes |