Search code in a repository
github_search_codeSearch file contents in a specific GitHub repository using code-search syntax to find matching files and snippets for SEO audits and code fixes.
Instructions
Search file contents in one repository (GitHub code search syntax, e.g. 'og:image path:src', 'canonical extension:astro'). Returns matching files with fragments. Indexed for the default branch only.
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": {
"repo": "<repo>",
"query": "<query>"
},
"name": "github_search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository as 'owner/name', e.g. 'octocat/my-site'. | |
| limit | No | ||
| query | Yes |