enquire-mcp API reference - v3.11.6-rc.2
    Preparing search index...

    Interface ServeOptions

    Configuration for startServer / prepareServerDeps. Mirrors the CLI flag surface (enquire-mcp serve --vault X --enable-write) but typed as a plain options object so HTTP transport / tests can call the same entry points programmatically.

    Strings on numeric fields (e.g. maxFileBytes, cacheSize) reflect the fact that callers usually pass CLI args verbatim — parsing happens inside prepareServerDeps via parsePositiveInt.

    interface ServeOptions {
        cacheFile?: string;
        cacheSize?: string;
        diagnosticSearchTools?: boolean;
        disabledTools?: string[];
        enabledTools?: string[];
        enableReranker?: boolean;
        enableWrite?: boolean;
        excludeGlob?: string[];
        feedbackWeight?: string;
        hnswEf?: string;
        hnswPersist?: boolean;
        includePdfs?: boolean;
        indexFile?: string;
        lateChunkContext?: string;
        maxFileBytes?: string;
        ocrLangs?: string;
        ocrMaxPages?: string;
        ocrPdfs?: boolean;
        persistentCache?: boolean;
        persistentIndex?: boolean;
        quantizeEmbeddings?: "f32" | "int8";
        readPaths?: string[];
        recencyWeight?: string;
        rerankerModel?: string;
        rerankerTopN?: string;
        staleDays?: string;
        tokenize?: "unicode61" | "trigram";
        useHnsw?: boolean;
        vault: string;
        watch?: boolean;
    }
    Index

    Properties

    cacheFile?: string

    Override the persistent cache file location.

    cacheSize?: string

    In-memory parsed-note cache capacity.

    diagnosticSearchTools?: boolean

    Expose diagnostic / debug tools (obsidian_full_text_search etc.).

    disabledTools?: string[]

    Per-tool gating: deny list. Tools named here won't register.

    enabledTools?: string[]

    Per-tool gating: allow list. Only listed tools register (deny still applies).

    enableReranker?: boolean

    v2.9.0 — enable BGE cross-encoder reranking on top of RRF in obsidian_search. Off by default; adds ~30-50ms per query at top-50.

    enableWrite?: boolean

    Allow the gated write tools (obsidian_create_note, obsidian_append_to_note, obsidian_rename_note, obsidian_archive_note, …). Default false (read-only).

    excludeGlob?: string[]

    Privacy: glob patterns to exclude from the vault.

    feedbackWeight?: string

    v3.11.0 — opt-in closed-loop feedback weight in [0,1]. Default 0 (OFF — no obsidian_mark_useful tool, no rank boost; ranking stays relevance-pure). When > 0, registers obsidian_mark_useful and blends each note's recorded usefulness (useful/(useful+notUseful+1)) into the obsidian_search order: (1-w)*relevanceRank + w*feedbackScore. State persists in a per-vault cache sidecar (<hash>.feedback.json; paths + counts only).

    hnswEf?: string

    v2.13.0 — HNSW search-time beam width (default 100; ≥k).

    hnswPersist?: boolean

    v2.16.0 — persist HNSW index to disk for fast reload on next serve. Default true (the persistence is a pure optimization; corrupt files fall back to rebuild gracefully). Pass --no-hnsw-persist to opt out.

    includePdfs?: boolean

    v2.8.0 — also index PDFs into FTS5 (and embeddings, if a build-embeddings with --include-pdfs ran). Off by default; opt-in because PDF extraction is slower than markdown.

    indexFile?: string

    Override the FTS5 index file location.

    lateChunkContext?: string

    v2.15.0 — late-chunking context windowing for embeddings (default 0 chars).

    maxFileBytes?: string

    Per-file size cap (parsed via parsePositiveInt).

    ocrLangs?: string

    v3.9.0-rc.1 — Tesseract language pack for OCR-on-watch. Default "eng". Multi-lang via +, e.g. "eng+rus". Languages must be pre-installed via enquire-mcp install-ocr-lang <code> (no runtime download).

    ocrMaxPages?: string

    v3.9.0-rc.1 — page cap for OCR-on-watch runs. Default 200 (matches DEFAULT_OCR_MAX_PAGES). Image-only PDFs exceeding this skip embed-sync (FTS5 still updates from the pdfjs extractPdfText result, which returns empty pages for image-only PDFs).

    ocrPdfs?: boolean

    v3.9.0-rc.1 — also run Tesseract OCR on image-only / scanned PDFs that pdfjs can't read text from, so the watcher's embed-db sync keeps OCR'd PDFs in sync with edits during a long serve session. Requires --watch + --include-pdfs + the tesseract.js / @napi-rs/canvas optional dependencies. Off by default — OCR is slow (~1-2s per page on M1 CPU; bounded by --ocr-max-pages, default 200).

    persistentCache?: boolean

    Persist the parse cache across server restarts.

    persistentIndex?: boolean

    Enable the persistent FTS5 index (requires better-sqlite3).

    quantizeEmbeddings?: "f32" | "int8"

    v2.17.0 — vector storage encoding for the persistent embed db.

    • "f32" (default) — Float32 BLOB, identical to v2.16- behavior.
    • "int8" — int8-quantized BLOB + per-vector (vMin, scale) Float32 tuple. ~4× storage reduction at ~1-2% recall@10 cost. Mode is per-database; switching modes triggers a full rebuild (the meta-table contamination guard treats it as a schema change). Must match the mode used at build-embeddings time — serving with a different mode would auto-rebuild the index.
    readPaths?: string[]

    Privacy: glob patterns that form a strict allowlist.

    recencyWeight?: string

    v3.10.0-rc.5 — opt-in recency re-ranking weight in [0,1] for obsidian_search. Default 0 (OFF — ranking stays purely relevance-driven). When > 0, the fused order is re-sorted by (1-w)*relevanceRank + w*recency.

    rerankerModel?: string

    v2.9.0 — reranker model alias (default "rerank-multilingual").

    rerankerTopN?: string

    v2.9.0 — how many top fused candidates to rerank (default 50).

    staleDays?: string

    v3.10.0-rc.5 — recency half-life in days for --recency-weight (age at which recency score = 0.5). Default 365. Tunes recency RE-RANKING only; the stale flag on hits always uses the fixed 365-day default (rc.40 #9 — was mis-claimed as this flag's threshold).

    tokenize?: "unicode61" | "trigram"

    FTS5 tokenizer mode.

    useHnsw?: boolean

    v2.13.0 — build an in-memory HNSW vector index on serve start. Off by default; rebuild cost ~25s for 50K chunks. Sub-10ms top-K per query thereafter, vs O(n) brute-force without it. Defers persistence to v3.0.

    vault: string

    Absolute path to the vault root directory. Required.

    watch?: boolean

    Enable the filesystem watcher (auto-reindex on change).