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

    Function createNote

    • Create a new note (or overwrite an existing one) with optional YAML frontmatter.

      Frontmatter is serialized via gray-matter (js-yaml underneath), so values like dates / lists / pipe-containing strings round-trip cleanly without the hand-rolled-YAML corruption the old composer suffered. WRITE TOOL — only registered when the server is started with --enable-write.

      Parameters

      • vault: Vault

        The vault. Must allow writes (vault.writeEnabled is true).

      • args: {
            content: string;
            frontmatter?: Record<string, unknown>;
            overwrite?: boolean;
            path: string;
        }

        path is the vault-relative target. content is the body (frontmatter prepended automatically). frontmatter is the optional YAML. overwrite defaults to false — set true to replace an existing note.

      Returns Promise<{ bytes: number; mtime: string; path: string }>

      { path, mtime, bytes } — resolved vault-relative path, ISO mtime, and UTF-8 byte size of the written file.

      If the vault is read-only, the destination exists and overwrite is not true, or the path is excluded by privacy filters.

      If the path traverses outside the vault root.

      const r = await createNote(vault, {
      path: "Posts/2026/Hybrid-Retrieval.md",
      frontmatter: { status: "draft", tags: ["retrieval", "rag"] },
      content: "# Hybrid Retrieval\n\nBM25 + embeddings...",
      overwrite: false
      });
      console.log(r.path, r.bytes);