fetchGithubContent
Fetch GitHub or Gitee URL content to retrieve READMEs, file line ranges, trees, issues, PRs, commits, releases, or search repo symbols without cloning.
Instructions
Fetch GitHub/Gitee by URL: README, file (/blob/, lines), tree, issue, PR, commit, releases, or repo symbol search ('symbol'). Example: https://github.com/o/r/blob/main/src/index.ts — ref can be branch/tag/commit; not a repo clone.
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": {
"url": "<url>"
},
"name": "fetchGithubContent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Optional branch, tag, or commit for symbol search (defaults to repo default branch). | |
| url | Yes | ||
| lines | No | Optional source-file line range, 1-based inclusive (e.g. "120-180"). Only valid for /blob/ URLs; URL hash #L120-L180 also works. | |
| symbol | No | Optional code symbol to search in the repository (e.g. "Use", "RouterGroup", "createContext"). Performs fast whole-repo syntactic search. | |
| maxResults | No | Optional max number of symbol search results to return (1-20, default 5). | |
| releaseLimit | No | Optional number of releases to return for /releases URLs (1-30, default 10). |