search_code
Search code inside a specific GitHub repository. Specify owner, repository name, and query terms to retrieve matching code lines.
Instructions
Search code within a single allowlisted repo. Note: GitHub's code search only indexes forks that have more stars than their parent repo, and can lag for low-activity repos - a 0-result response may mean 'not indexed yet' rather than 'no matches'.
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": {
"owner": "<owner>",
"repo": "<repo>",
"query": "<query>"
},
"name": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name | |
| limit | No | ||
| owner | Yes | Repository owner (user or org) | |
| query | Yes | Search terms, e.g. "TODO" or "function foo" |