search_context
Search a GitHub repository and return only the passages that match a query — each with its file path, line number and a relevance score. Far more token-efficient than pack_repo when you need a specific detail (e.g. "where is auth handled?").
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": "search_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Optional branch, tag or commit SHA (defaults to the default branch). | |
| repo | Yes | A GitHub repo as "owner/repo" or a github.com URL. | |
| query | Yes | Space-separated search terms; matching is case-insensitive. | |
| exclude | No | Optional glob patterns (support **, *, ?). | |
| include | No | Optional glob patterns (support **, *, ?). | |
| max_matches | No | Max passages to return (1–50, default 5). | |
| context_chars | No | Per-passage character budget (80–4000, default 500). |