enquire-mcp API reference - v3.9.0-rc.4
    Preparing search index...

    Function replaceInNotes

    • Bulk literal-substring find/replace across the vault, code-fence aware.

      Walks every note (optionally scoped to folder), replaces every occurrence of search with replace outside fenced code blocks (``` and ~~~), and writes results. The fence-awareness is critical — bulk find/replace that touches example snippets in documentation has been a historical foot-gun. Per-file write errors are collected (not thrown) so a single bad write doesn't lose the rest of the apply; check partial and errors in the response. WRITE TOOL — only registered with --enable-write.

      Parameters

      Returns Promise<ReplaceInNotesResult>

      A ReplaceInNotesResult with per-file counts, totals, and partial-write observability.

      On invalid args (empty search, search === replace), privacy-excluded folder, or a systemic write failure (read-only vault).

      // Preview a typo fix
      const preview = await replaceInNotes(vault, {
      search: "embedings",
      replace: "embeddings",
      dry_run: true,
      case_sensitive: false
      });
      console.log(`Would update ${preview.files_updated.length} files`);

      // Apply
      await replaceInNotes(vault, {
      search: "embedings",
      replace: "embeddings",
      case_sensitive: false
      });