search_code
Search file contents by regex or literal text across directories, returning path:line matches with optional surrounding context lines.
Instructions
Search file contents with a regex (ripgrep when installed, Node fallback otherwise). Returns path:line: text; context adds surrounding lines.
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": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| glob | No | File filter, e.g. "*.ts" | |
| path | No | Directory to search (default: default workspace) | |
| query | Yes | Regex (or literal text with literal: true) | |
| context | No | ||
| literal | No | ||
| maxResults | No | ||
| caseSensitive | No |