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

    Function dataviewQuery

    • Run a Dataview-style DQL query against the vault.

      Parses the input with the project's DQL frontend (see src/dql.ts) and executes against the live vault index. Supports a subset of Dataview's syntax: TABLE / LIST projections, WHERE clauses, FROM "folder" / FROM #tag sources, SORT, LIMIT, GROUP BY. No formula evaluator — pure field projection + boolean filters (formula evaluator deferred per v3.6.0 non-goals).

      Parameters

      • vault: Vault

        The vault to query.

      • args: { query: string }

        query is the DQL string.

      Returns Promise<{ query: string; rows: Record<string, unknown>[] }>

      { query, rows }rows is an array of objects keyed by the projected fields.

      If the DQL fails to parse or references an unknown source.

      const r = await dataviewQuery(vault, {
      query: 'TABLE status, mtime FROM "Posts" WHERE status = "draft" SORT mtime DESC'
      });
      for (const row of r.rows) console.log(row);