search_code
Search across GitHub repositories using code search syntax. Find code by repo, language, or keywords.
Instructions
Search for code across GitHub repos. Requires a fine-grained token with 'Code: Read' scope, or a classic token with repo scope.
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": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of code-search results to return | |
| query | Yes | Search query in GitHub code search syntax, e.g. 'repo:owner/name function_name' or 'language:python async' |