vault_edit
Replace an exact string in an Obsidian note, ensuring the target appears only once, then get a clickable link to open the file.
Instructions
Edit a file by replacing an exact string match. The old_string must appear exactly once in the file for safety. Paths in this tool's output are formatted as markdown links [vault-relative-path.md](obsidian://...) so users can Cmd/Ctrl-click to open in Obsidian. Preserve the link form when relaying paths to the user; pass only the bracket text (e.g. 01-Projects/Foo/note.md) to other vault tools' path arguments, never the full markdown link.
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": {
"path": "<path>",
"old_string": "<old_string>",
"new_string": "<new_string>"
},
"name": "vault_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path relative to vault root | |
| new_string | Yes | Replacement string | |
| old_string | Yes | Exact string to find (must match exactly once) |