search
Locate lines in markdown files by case-insensitive substring query. Retrieves file path, line number, snippet, and heading context, with configurable recursion and maximum results.
Instructions
Case-insensitive full-text substring search across MARKDOWN docs (for code symbol definitions use find). Returns matches {path, line, snippet (≤200 chars), inHeading}, heading matches ranked first, capped at max_results (default 50, max 200) with totalMatches and truncated:true when capped. Empty/whitespace queries are rejected (they would match everything). Locate the right doc, then outline/heading to read it.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No | Directory to search, relative to the working directory (default: the working directory). | |
| query | Yes | Search term — case-insensitive substring, matched per line. Must be non-empty. | |
| recursive | No | Recurse into subdirectories (default: true). | |
| max_results | No | Max matches (default 50, clamped to 1–200). |