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

    Function openInUi

    • Emit an obsidian:// URI for hand-off to the Obsidian desktop app.

      No filesystem or network side effect — the URI emission lets the agent say "open this in Obsidian" without enquire-mcp needing to coordinate with the running app (pattern from cyanheads' Obsidian MCP). The vault name is the leaf of the vault root path; Obsidian matches by name OR by file's absolute path, so this works even when the user opened the vault under a different name client-side.

      Parameters

      • vault: Vault

        The vault.

      • args: { new_pane?: boolean; path?: string; title?: string }

        One of path or title required. new_pane: true opens the note in a new pane.

      Returns Promise<OpenInUiResult>

      An OpenInUiResult. The caller is responsible for actually emitting the URI (e.g. via the MCP client surface or stdout).

      If target can't be resolved.

      const r = await openInUi(vault, {
      path: "Reference/Article.md",
      new_pane: true
      });
      console.log(r.uri); // → obsidian://open?vault=Vault&file=Reference/Article&newpane=true