search_code
Find code matching a query in GitHub repositories, returning matching files with highlighted fragments showing exact match locations. Supports filtering by repo, path, extension, and result limits.
Instructions
Search code in the repo for a query string; returns matching files with highlighted fragments showing exactly where the match occurs. Requires GITHUB_TOKEN.
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 |
|---|---|---|---|
| path | No | ||
| repo | No | ||
| owner | No | ||
| query | Yes | ||
| extension | No | ||
| max_results | No |