github_search_code
Search file contents in a GitHub repository (GitHub code search). Returns matching file paths with text-match fragments around each hit. Searches the repository's default branch only and requires the repository to be indexed by GitHub; when the search is rejected or comes back empty, fall back to github_list_repository_files and github_read_file. 'repo' also accepts the combined 'owner/name' form.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Restrict matches to files under this path prefix (GitHub path: qualifier). | |
| repo | Yes | Repository name. Also accepts the combined 'owner/name' form. | |
| owner | No | Repository owner (organisation or user). May be omitted when the repository name is unambiguous in this organisation, or embedded in 'repo' as 'owner/name'. | |
| query | Yes | Code search terms (GitHub code-search syntax; bare words match file contents). The repo:/path: qualifiers are added by the tool from the 'repo' and 'path' parameters; any you supply here are stripped. |