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

    Function frontmatterGet

    • Read a note's frontmatter — full map, or a single key's value.

      The read-only counterpart to frontmatterSet (write side). Use this before bulk-editing frontmatter so the agent can reason about current state before issuing a write. When key is set, the response includes the resolved value (which may be undefined if the key is absent).

      Parameters

      • vault: Vault

        The vault to read from.

      • args: { key?: string; path?: string; title?: string }

        One of path or title is required. key narrows the response to a single value.

      Returns Promise<{ frontmatter: Record<string, unknown>; path: string; value?: unknown }>

      { path, frontmatter, value? }value is only included when key is set.

      If the target can't be resolved.

      // Read all frontmatter
      const all = await frontmatterGet(vault, { path: "Posts/Article.md" });

      // Read a single key
      const just = await frontmatterGet(vault, {
      path: "Posts/Article.md",
      key: "status"
      });
      console.log(just.value); // → "draft"