Semantic code search
scratchbook_searchDescribe a concept or behavior in natural language to find where it lives in the code. Returns matching code chunks with file:line locations and snippets.
Instructions
Semantic search across a codebase's indexed code. Returns the most relevant code chunks with file:line locations, enclosing symbol and a snippet — across the whole repo, not just one directory (unlike grep). Use it to locate where a concept or behaviour lives before reading files. Ask in natural language ('where are TTS chunks cached', 'auth token verification'). The project must be indexed first.
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": {
"query": "<query>"
},
"name": "scratchbook_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Number of results (default 8). | |
| lang | No | Restrict to a language, e.g. 'typescript', 'python'. | |
| query | Yes | Natural-language description of the code/behaviour you're looking for. | |
| project | No | Absolute project root. Defaults to the server's cwd. | |
| path_prefix | No | Restrict to paths starting with this prefix, e.g. 'lib/tts'. |