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

    Interface ServerDeps

    Heavyweight resources shared across every MCP-server instance: the vault (parsed-note cache + privacy filter), the FTS5 index handle, the optional filesystem watcher. v2.6.0 split this out so the HTTP transport can spin up a fresh McpServer per session over the SAME vault/index — opening the SQLite handle once and reusing it across thousands of remote-MCP calls.

    warningTracker is a single-fire latch for the --disabled-tools / --enabled-tools typo warnings: stdio prints them once at boot; HTTP prints them on the first session build, then never again.

    interface ServerDeps {
        disabledTools: Set<string>;
        enabledTools: Set<string>;
        ftsIndex: FtsIndex | null;
        hnswContext:
            | {
                ef?: number;
                index: HnswIndex;
                modelAlias: string;
                rowByLabel: Map<
                    number,
                    {
                        chunk_index: number;
                        kind: "md"
                        | "pdf";
                        line_end: number;
                        line_start: number;
                        rel_path: string;
                        text_preview: string;
                    },
                >;
            }
            | null;
        vault: Vault;
        warningTracker: { printed: boolean };
        watcher: VaultWatcher | null;
        watcherEmbedDb: EmbedDb | null;
    }
    Index

    Properties

    disabledTools: Set<string>
    enabledTools: Set<string>
    ftsIndex: FtsIndex | null
    hnswContext:
        | {
            ef?: number;
            index: HnswIndex;
            modelAlias: string;
            rowByLabel: Map<
                number,
                {
                    chunk_index: number;
                    kind: "md"
                    | "pdf";
                    line_end: number;
                    line_start: number;
                    rel_path: string;
                    text_preview: string;
                },
            >;
        }
        | null

    v2.13.0 — opt-in HNSW vector index built in-memory on serve start from the embed-db rows. Sub-10ms top-K queries vs O(n) brute-force. null when --use-hnsw wasn't passed or the embed-db doesn't exist.

    Type Declaration

    • {
          ef?: number;
          index: HnswIndex;
          modelAlias: string;
          rowByLabel: Map<
              number,
              {
                  chunk_index: number;
                  kind: "md"
                  | "pdf";
                  line_end: number;
                  line_start: number;
                  rel_path: string;
                  text_preview: string;
              },
          >;
      }
      • Optionalef?: number

        Search-time beam width override; falls back to module default if undefined.

      • index: HnswIndex

        The HNSW index.

      • modelAlias: string

        v3.6.2 HN-4 — model alias the HNSW index was built with (from the embed-db's persisted meta, or the resolved default for fresh dbs). Propagated to HnswSearchContext at search time so the query embedder model can be verified against the index. CRIT-1 fixed the build-side destruction; this seals the search side.

      • rowByLabel: Map<
            number,
            {
                chunk_index: number;
                kind: "md"
                | "pdf";
                line_end: number;
                line_start: number;
                rel_path: string;
                text_preview: string;
            },
        >

        Map from HNSW label (= embeddings.id) to source row metadata.

    • null
    vault: Vault
    warningTracker: { printed: boolean }
    watcher: VaultWatcher | null
    watcherEmbedDb: EmbedDb | null

    v3.8.0-rc.2 R-7 — embed-db handle owned by the watcher for runtime incremental sync. Opened in prepareServerDeps when --watch is on AND the embed-db file exists, separate from the HNSW init path (which opens its own short-lived handle for the rebuild scan). SQLite WAL mode allows concurrent opens to the same file; the two handles see consistent state via MVCC. Closed by the shutdown handler in startServer.