GitHub code search
github_search_codeSearch code across GitHub repositories by query to locate matching files and snippets; supports pagination and cache bypass.
Instructions
Search code across GitHub. Requires a token; GitHub allows this endpoint only 10 requests/minute and caps results at 1000.
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": {
"query": "<query>"
},
"name": "github_search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number, starting at 1 | |
| fresh | No | Bypass the local cache | |
| query | Yes | GitHub code search query | |
| per_page | No | Items per page, default 20 |