get_file_contents
Read a file from a GitHub repository by specifying the repository, file path, and optionally a branch or commit.
Instructions
Read 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": {
"repo": "<repo>",
"path": "<path>"
},
"name": "get_file_contents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository in 'owner/repo' format. | |
| path | Yes | File path (e.g. 'src/main.py'). | |
| ref | No | Branch, tag, or commit SHA (default: default branch). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |