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

    Function searchText

    • Substring-grep search over the vault: scans every .md body for token occurrences in all / any / phrase mode and ranks by occurrence count.

      This is the simplest retrieval primitive — no index, no embeddings, no native deps. Useful when the agent already knows specific keywords; for fuzzier semantic recall prefer searchHybrid or semanticSearch. Read concurrency is bounded to 16 to avoid blowing the fd limit on large vaults. Tokenization is whitespace-split + lowercased; case-insensitive.

      Parameters

      • vault: Vault

        The vault to search.

      • args: { folder?: string; limit?: number; mode?: SearchMode; query: string }

        Search arguments. query is required and must be non-empty. folder restricts the scan to a subdirectory (vault-relative). limit caps results (default 25). mode defaults to "all".

      Returns Promise<SearchResponse>

      A SearchResponse with sorted matches and a scanned_notes observability count.

      If query is empty / whitespace-only.

      If folder resolves outside the vault root.

      const result = await searchText(vault, {
      query: "RAG retrieval",
      folder: "Reference",
      mode: "all",
      limit: 10
      });
      for (const hit of result.matches) {
      console.log(`${hit.path}:${hit.line} — ${hit.snippet}`);
      }