search_code
Find code across GitHub using qualifiers for repository, language, and file path to pinpoint specific implementations.
Instructions
Search code across GitHub. The q parameter accepts GitHub code-search qualifiers (e.g. "addClass repo:jquery/jquery in:file language:js"). Sort and order are omitted because GitHub is closing down sortable code search; results are ranked by relevance. Docs: https://docs.github.com/en/rest/search/search#search-code
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": {
"q": "<q>"
},
"name": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Search query. Accepts qualifiers like repo:, path:, language:, in:file, in:path. | |
| page | No | ||
| per_page | No |