search_code
Search GitHub repositories for code matching keywords, filtering by owner, repo, language, or file path to locate specific implementations.
Instructions
Search for code across GitHub repositories or within a specific repository.
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 |
|---|---|---|---|
| page | No | Page number | |
| path | No | Filter by file path or extension (e.g. "src", "path:app/*.ts") | |
| repo | No | Filter by specific repository name | |
| owner | No | Filter by GitHub user or organization name | |
| query | Yes | Search terms or keywords (e.g. "McpServer", "function calculateTotal") | |
| language | No | Filter by programming language (e.g. "typescript", "python") | |
| per_page | No | Results per page (max 100) |