Why?
Use GitHub search when your primary agent needs to find code snippets from a public repository that isn’t cloned locally — exploring how an open-source library works, finding usage patterns, or pulling reference implementations. See the GitHub search example.Direct Usage
As an Agent Tool
Each SDK adapter providescreateGitHubSearchTool():
githubTool in your tools array the same way as createWarpGrepTool. GitHub search returns the same WarpGrepResult format as codebase search.
Options
createGitHubSearchTool() accepts:
| Option | Default | Description |
|---|---|---|
morphApiKey | MORPH_API_KEY env var | API key for Morph |
morphApiUrl | https://api.morphllm.com | Override API base URL |
codeSearchUrl | https://morphllm.com | Code storage service URL |
timeout | 30000 | Timeout in ms |