replace_in_note
Replace exact text in a note's body while preserving frontmatter. Specify note path, old and new text, and choose to change only the first match or all occurrences.
Instructions
Replace text in a note's body content.
Performs plain string find-and-replace on the note body (not frontmatter). Fails if old_text is not found.
Args: note_path: Path to the note relative to vault root. old_text: The exact text to find. new_text: The replacement text. count: Number of occurrences to replace. 1 = first match only (default), 0 = replace all.
Returns: Success message or error description.
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": {
"note_path": "<note_path>",
"old_text": "<old_text>",
"new_text": "<new_text>"
},
"name": "replace_in_note"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| new_text | Yes | ||
| old_text | Yes | ||
| note_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |