Skip to main content
Glama

vault_patch

Replace specific text in Obsidian vault files with automatic git commit tracking. Supports single or multiple surgical replacements while maintaining file integrity.

Instructions

Surgical text replacement in a vault file with auto git commit.

Supports single or multi-replacement. For single replacement, provide old_text and new_text. For multiple replacements, provide patches — a list of {old_text, new_text} dicts applied in sequence. Do not mix both modes.

Each old_text must appear exactly once in the file (after prior patches in the list have been applied). If any patch fails validation, no changes are written.

Args: project: Project slug or '_meta' for cross-project content. path: Relative path to the file within the project. old_text: Exact text to find and replace (single mode). Empty = not set. new_text: Replacement text (single mode). Empty = not set. patches: List of {old_text, new_text} dicts (multi mode).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
pathYes
old_textNo
new_textNo
patchesNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mlorentedev/hive'

If you have feedback or need assistance with the MCP directory API, please join our Discord server