Read a GitHub source file
read_github_sourceReads a file from a GitHub repository, with optional token for private repos, character limit, and offset for truncated content.
Instructions
Reads one file from a GitHub repository using the GitHub contents API. GITHUB_TOKEN is optional for public repositories and required for private ones.
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": "read_github_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| path | Yes | ||
| repo | Yes | ||
| owner | Yes | ||
| offset | No | Character offset for continuing a truncated source. | |
| maxChars | No | Maximum source characters returned in this call. |