GitHub Code Search
github_code_searchSearch GitHub code by exact substring. Provide a code snippet and filter by language, extension, filename, owner, or repo to locate specific code patterns. Returns matching files with code context.
Instructions
Search files on GitHub with code snippets. This is not a fuzzy search, so provide exact substrings you want to find.
Normally you should try different queries and combinations of filters until you get useful results. If you are searching for something generic, try thinking in reverse about what the code might be, and search for that code snippet instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code_snippet | Yes | Search exact string you want to find. DO NOT use any wildcard syntax. | |
| extension | No | ||
| filename | No | ||
| owner | No | ||
| repo | No | Format: owner/repo | |
| language | No | ||
| match_type | No | content |