search_code
Search code across GitHub repositories using queries to find specific functions, imports, or patterns in codebases.
Instructions
Search code across GitHub repositories.
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 |
|---|---|---|---|
| query | Yes | Search query (e.g. 'def main repo:owner/repo', 'import fastapi language:python') | |
| per_page | No | Results per page (max 100) | |
| page | No | Page number |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |