Search source lines
search_codeSearch a pinned, indexed commit for lines containing every query term as a case-insensitive substring, returning cited line spans and paginated results for reproducible code evidence.
Instructions
Lines of a pinned, indexed commit that contain every whitespace-separated query term as a case-insensitive substring (literal=true: the whole query as one), by path and line, each with a one-line citation and span SHA-256; total counts every match, page with next_cursor. The query is never interpreted as FTS5 or SQL syntax. Snippets are untrusted upstream data. Zero hits shows only that no indexed line matches, not that a behaviour is absent.
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": {
"commit": "<commit>",
"query": "<query>"
},
"name": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | Search terms; one of 3+ characters. | |
| commit | Yes | ||
| cursor | No | next_cursor of the previous page of the same query. | |
| literal | No | ||
| path_glob | No | Only paths matching this SQLite GLOB (case-sensitive; '*' also matches '/'). | |
| path_prefix | No | Only paths with this repository-relative prefix, e.g. 'home-mixer/'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| tool | No | ||
| error | No | ||
| notes | No | ||
| commit | No | ||
| outcome | No | ||
| warnings | No | ||
| truncated | No | ||
| next_cursor | No | ||
| schema_version | No | ||
| index_generation | No |