get_file_content
Fetch a text file's contents from a GitHub repo by providing the repo and file path. Use the repository structure to locate the exact path first; binary files are rejected with a link instead.
Instructions
Read the contents of one specific text file in a repo (source code, config, docs). Use get_repo_structure first if you're not sure of the exact path. Binary files (images, archives, etc.) are refused with a link instead.
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_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path inside the repo, e.g. 'src/index.js' or 'README.md'. | |
| repo | Yes | Repo as 'owner/name' (e.g. 'facebook/react') or a GitHub URL — usually copied straight from a search result. |