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

    Function resolveWikilink

    • Resolve an Obsidian wikilink string to a concrete vault file (or report unresolved).

      Accepts the full wikilink syntax ([[Target]], [[Target|alias]], [[Target#section]], [[Target^block]], ![[Embedded]]) and parses out the components. Resolution uses the project's fuzzy-match path — exact basename, then in-folder, then global — same algorithm Obsidian uses client-side. Pass from_note to bias resolution toward the same folder.

      Parameters

      • vault: Vault

        The vault to resolve against.

      • args: { from_note?: string; include_content?: boolean; wikilink: string }

        wikilink is required and may include or omit the [[ ... ]] brackets. from_note (vault-relative path) is the source note — used for folder-local resolution priority. include_content defaults to true; set false to skip the body read.

      Returns Promise<
          {
              alias: string
              | null;
              block: string | null;
              content: string | null;
              found: boolean;
              path: string | null;
              section: string | null;
              title: string | null;
          },
      >

      { found, path, title, content, section, block, alias }. When found is false all path/title/content are null but section/block/alias are still parsed (so the agent can report "broken link to [[Foo#Bar]]").

      const r = await resolveWikilink(vault, {
      wikilink: "[[Hybrid Retrieval#BM25|the BM25 part]]",
      from_note: "Posts/2026/Article.md"
      });
      if (r.found) console.log(r.path, r.section, r.alias);