search_text
Find plain text or regex matches across an Obsidian vault, returning surrounding line context with optional folder or glob filters, and searching non-Markdown files when needed.
Instructions
Grep the vault: plain text or regex, with N lines of context, optional file glob/folder. Also searches non-markdown text files when all_files is true.
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": {
"pattern": "<pattern>"
},
"name": "search_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default 200) | |
| regex | No | ||
| vault | No | Vault name, id or folder path (see list_vaults). Default: OBSIDIAN_VAULT or the vault open in Obsidian. | |
| folder | No | Limit to this folder (vault-relative) | |
| context | No | Lines of context (default 0) | |
| pattern | Yes | ||
| all_files | No | ||
| whole_word | No | ||
| case_sensitive | No |