@oomkapwn/enquire-mcp 3.6.1 → 3.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +125 -0
- package/README.md +21 -9
- package/assets/social-preview.png +0 -0
- package/dist/bases.d.ts +13 -3
- package/dist/bases.d.ts.map +1 -1
- package/dist/bases.js +64 -9
- package/dist/bases.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -2
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +10 -2
- package/dist/doctor.js.map +1 -1
- package/dist/dql.d.ts +67 -0
- package/dist/dql.d.ts.map +1 -1
- package/dist/dql.js +45 -0
- package/dist/dql.js.map +1 -1
- package/dist/embed-db.d.ts +45 -0
- package/dist/embed-db.d.ts.map +1 -1
- package/dist/embed-db.js +31 -0
- package/dist/embed-db.js.map +1 -1
- package/dist/embeddings.d.ts +33 -0
- package/dist/embeddings.d.ts.map +1 -1
- package/dist/embeddings.js +29 -0
- package/dist/embeddings.js.map +1 -1
- package/dist/fts5.d.ts +123 -0
- package/dist/fts5.d.ts.map +1 -1
- package/dist/fts5.js +130 -4
- package/dist/fts5.js.map +1 -1
- package/dist/hnsw.d.ts.map +1 -1
- package/dist/hnsw.js +11 -0
- package/dist/hnsw.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/parser.d.ts +80 -0
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +48 -0
- package/dist/parser.js.map +1 -1
- package/dist/server.d.ts +34 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +23 -3
- package/dist/server.js.map +1 -1
- package/dist/tool-registry.js +1 -1
- package/dist/tool-registry.js.map +1 -1
- package/dist/tools/media.d.ts +1 -1
- package/dist/tools/media.js +1 -1
- package/dist/tools/meta.d.ts +2 -2
- package/dist/tools/meta.js +2 -2
- package/dist/tools/search.d.ts +32 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +51 -4
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/write.d.ts +2 -2
- package/dist/tools/write.js +2 -2
- package/dist/tools.d.ts +980 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +3132 -0
- package/dist/tools.js.map +1 -0
- package/dist/vault.d.ts +179 -0
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +157 -0
- package/dist/vault.js.map +1 -1
- package/docs/COMPARISON.md +5 -5
- package/docs/QUICKSTART.md +2 -2
- package/docs/api-reference/.nojekyll +1 -0
- package/docs/api-reference/assets/hierarchy.js +1 -0
- package/docs/api-reference/assets/highlight.css +71 -0
- package/docs/api-reference/assets/icons.js +18 -0
- package/docs/api-reference/assets/icons.svg +1 -0
- package/docs/api-reference/assets/main.js +60 -0
- package/docs/api-reference/assets/navigation.js +1 -0
- package/docs/api-reference/assets/search.js +1 -0
- package/docs/api-reference/assets/style.css +1633 -0
- package/docs/api-reference/functions/index.buildEmbedText.html +15 -0
- package/docs/api-reference/functions/index.buildMcpServer.html +4 -0
- package/docs/api-reference/functions/index.formatReadyBanner.html +4 -0
- package/docs/api-reference/functions/index.main.html +1 -0
- package/docs/api-reference/functions/index.parsePositiveInt.html +1 -0
- package/docs/api-reference/functions/index.parseQuantizationMode.html +5 -0
- package/docs/api-reference/functions/index.prepareServerDeps.html +5 -0
- package/docs/api-reference/functions/index.startServer.html +1 -0
- package/docs/api-reference/functions/tools.appendToNote.html +17 -0
- package/docs/api-reference/functions/tools.archiveNote.html +15 -0
- package/docs/api-reference/functions/tools.assertHnswModelMatchesEmbedder.html +13 -0
- package/docs/api-reference/functions/tools.chatThreadAppend.html +22 -0
- package/docs/api-reference/functions/tools.chatThreadRead.html +16 -0
- package/docs/api-reference/functions/tools.contextPack.html +21 -0
- package/docs/api-reference/functions/tools.createNote.html +19 -0
- package/docs/api-reference/functions/tools.dataviewQuery.html +16 -0
- package/docs/api-reference/functions/tools.embeddingsSearch.html +40 -0
- package/docs/api-reference/functions/tools.findPath.html +23 -0
- package/docs/api-reference/functions/tools.findSimilar.html +21 -0
- package/docs/api-reference/functions/tools.frontmatterGet.html +15 -0
- package/docs/api-reference/functions/tools.frontmatterSearch.html +16 -0
- package/docs/api-reference/functions/tools.frontmatterSet.html +19 -0
- package/docs/api-reference/functions/tools.getBacklinks.html +15 -0
- package/docs/api-reference/functions/tools.getNoteNeighbors.html +16 -0
- package/docs/api-reference/functions/tools.getOpenQuestions.html +19 -0
- package/docs/api-reference/functions/tools.getOutboundLinks.html +16 -0
- package/docs/api-reference/functions/tools.getRecentEdits.html +14 -0
- package/docs/api-reference/functions/tools.getUnresolvedWikilinks.html +14 -0
- package/docs/api-reference/functions/tools.getVaultStats.html +13 -0
- package/docs/api-reference/functions/tools.lintWiki.html +20 -0
- package/docs/api-reference/functions/tools.listCanvases.html +16 -0
- package/docs/api-reference/functions/tools.listNotes.html +19 -0
- package/docs/api-reference/functions/tools.listPdfs.html +15 -0
- package/docs/api-reference/functions/tools.listTags.html +14 -0
- package/docs/api-reference/functions/tools.ocrPdf.html +18 -0
- package/docs/api-reference/functions/tools.openInUi.html +17 -0
- package/docs/api-reference/functions/tools.paperAudit.html +16 -0
- package/docs/api-reference/functions/tools.pickEmbedTextForHyde.html +8 -0
- package/docs/api-reference/functions/tools.readCanvas.html +19 -0
- package/docs/api-reference/functions/tools.readNote.html +20 -0
- package/docs/api-reference/functions/tools.readPdf.html +18 -0
- package/docs/api-reference/functions/tools.renameNote.html +24 -0
- package/docs/api-reference/functions/tools.replaceInNotes.html +20 -0
- package/docs/api-reference/functions/tools.resolveTarget.html +24 -0
- package/docs/api-reference/functions/tools.resolveWikilink.html +20 -0
- package/docs/api-reference/functions/tools.searchHybrid.html +62 -0
- package/docs/api-reference/functions/tools.searchText.html +19 -0
- package/docs/api-reference/functions/tools.semanticSearch.html +19 -0
- package/docs/api-reference/functions/tools.validateNoteProposal.html +19 -0
- package/docs/api-reference/hierarchy.html +1 -0
- package/docs/api-reference/index.html +1 -0
- package/docs/api-reference/interfaces/index.ServeOptions.html +74 -0
- package/docs/api-reference/interfaces/index.ServerDeps.html +27 -0
- package/docs/api-reference/interfaces/tool-manifest.ToolManifestEntry.html +33 -0
- package/docs/api-reference/interfaces/tools.ArchiveNoteArgs.html +12 -0
- package/docs/api-reference/interfaces/tools.BacklinkHit.html +15 -0
- package/docs/api-reference/interfaces/tools.CanvasEdge.html +19 -0
- package/docs/api-reference/interfaces/tools.CanvasSummary.html +16 -0
- package/docs/api-reference/interfaces/tools.ChatThreadAppendArgs.html +10 -0
- package/docs/api-reference/interfaces/tools.ChatThreadMessage.html +14 -0
- package/docs/api-reference/interfaces/tools.ChatThreadReadResult.html +10 -0
- package/docs/api-reference/interfaces/tools.ContextPackArgs.html +12 -0
- package/docs/api-reference/interfaces/tools.ContextPackResult.html +20 -0
- package/docs/api-reference/interfaces/tools.EmbedHit.html +21 -0
- package/docs/api-reference/interfaces/tools.EmbedSearchResponse.html +14 -0
- package/docs/api-reference/interfaces/tools.FindPathResult.html +17 -0
- package/docs/api-reference/interfaces/tools.FrontmatterSearchArgs.html +20 -0
- package/docs/api-reference/interfaces/tools.FrontmatterSetArgs.html +13 -0
- package/docs/api-reference/interfaces/tools.HnswSearchContext.html +21 -0
- package/docs/api-reference/interfaces/tools.LintWikiArgs.html +14 -0
- package/docs/api-reference/interfaces/tools.LintWikiFinding.html +14 -0
- package/docs/api-reference/interfaces/tools.LintWikiResult.html +9 -0
- package/docs/api-reference/interfaces/tools.NoteNeighbors.html +17 -0
- package/docs/api-reference/interfaces/tools.NoteReadFull.html +20 -0
- package/docs/api-reference/interfaces/tools.NoteReadMap.html +25 -0
- package/docs/api-reference/interfaces/tools.NoteSummary.html +14 -0
- package/docs/api-reference/interfaces/tools.OcrPdfArgs.html +16 -0
- package/docs/api-reference/interfaces/tools.OcrPdfPage.html +15 -0
- package/docs/api-reference/interfaces/tools.OcrPdfResult.html +18 -0
- package/docs/api-reference/interfaces/tools.OpenInUiResult.html +11 -0
- package/docs/api-reference/interfaces/tools.OpenQuestion.html +20 -0
- package/docs/api-reference/interfaces/tools.OutboundLink.html +20 -0
- package/docs/api-reference/interfaces/tools.PaperAuditFinding.html +17 -0
- package/docs/api-reference/interfaces/tools.PathStep.html +9 -0
- package/docs/api-reference/interfaces/tools.PdfSummary.html +9 -0
- package/docs/api-reference/interfaces/tools.ReadCanvasResult.html +15 -0
- package/docs/api-reference/interfaces/tools.ReadPdfArgs.html +8 -0
- package/docs/api-reference/interfaces/tools.ReadPdfPage.html +13 -0
- package/docs/api-reference/interfaces/tools.ReadPdfResult.html +18 -0
- package/docs/api-reference/interfaces/tools.RenameNoteResult.html +14 -0
- package/docs/api-reference/interfaces/tools.RenameProposal.html +13 -0
- package/docs/api-reference/interfaces/tools.ReplaceInNotesArgs.html +15 -0
- package/docs/api-reference/interfaces/tools.ReplaceInNotesFileResult.html +6 -0
- package/docs/api-reference/interfaces/tools.ReplaceInNotesResult.html +21 -0
- package/docs/api-reference/interfaces/tools.SearchHit.html +16 -0
- package/docs/api-reference/interfaces/tools.SearchHybridHit.html +30 -0
- package/docs/api-reference/interfaces/tools.SearchHybridResponse.html +23 -0
- package/docs/api-reference/interfaces/tools.SearchResponse.html +13 -0
- package/docs/api-reference/interfaces/tools.SemanticHit.html +15 -0
- package/docs/api-reference/interfaces/tools.SimilarNote.html +15 -0
- package/docs/api-reference/interfaces/tools.TagSummary.html +13 -0
- package/docs/api-reference/interfaces/tools.UnresolvedWikilink.html +22 -0
- package/docs/api-reference/interfaces/tools.ValidateProposalArgs.html +10 -0
- package/docs/api-reference/interfaces/tools.ValidateProposalResult.html +14 -0
- package/docs/api-reference/interfaces/tools.VaultStats.html +26 -0
- package/docs/api-reference/modules/index.html +1 -0
- package/docs/api-reference/modules/tool-manifest.html +1 -0
- package/docs/api-reference/modules/tools.html +1 -0
- package/docs/api-reference/types/tools.CanvasNode.html +7 -0
- package/docs/api-reference/types/tools.SearchMode.html +7 -0
- package/docs/api-reference/variables/index.VERSION.html +9 -0
- package/docs/api-reference/variables/tool-manifest.TOOL_MANIFEST.html +1 -0
- package/docs/api.md +11 -11
- package/package.json +16 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>createNote | enquire-mcp API reference - v3.6.2</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.6.2</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">createNote</a></li></ul><h1>Function createNote</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="createnote"><span class="tsd-kind-call-signature">createNote</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">frontmatter</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">overwrite</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bytes</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">mtime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><a href="#createnote" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Create a new note (or overwrite an existing one) with optional YAML
|
|
2
|
+
frontmatter.</p>
|
|
3
|
+
<p>Frontmatter is serialized via gray-matter (js-yaml underneath), so values
|
|
4
|
+
like dates / lists / pipe-containing strings round-trip cleanly without
|
|
5
|
+
the hand-rolled-YAML corruption the old composer suffered. WRITE TOOL —
|
|
6
|
+
only registered when the server is started with <code>--enable-write</code>.</p>
|
|
7
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault. Must allow writes (<code>vault.writeEnabled</code> is true).</p>
|
|
8
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">frontmatter</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">overwrite</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p><code>path</code> is the vault-relative target. <code>content</code> is the body
|
|
9
|
+
(frontmatter prepended automatically). <code>frontmatter</code> is the optional YAML.
|
|
10
|
+
<code>overwrite</code> defaults to false — set true to replace an existing note.</p>
|
|
11
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bytes</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">mtime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span></h4><p><code>{ path, mtime, bytes }</code> — resolved vault-relative path, ISO
|
|
12
|
+
mtime, and UTF-8 byte size of the written file.</p>
|
|
13
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the vault is read-only, the destination exists and
|
|
14
|
+
<code>overwrite</code> is not true, or the path is excluded by privacy filters.</p>
|
|
15
|
+
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-1">Throws<a href="#throws-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the path traverses outside the vault root.</p>
|
|
16
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">r</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">createNote</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> path: </span><span class="hl-3">"Posts/2026/Hybrid-Retrieval.md"</span><span class="hl-1">,</span><br/><span class="hl-1"> frontmatter: { status: </span><span class="hl-3">"draft"</span><span class="hl-1">, tags: [</span><span class="hl-3">"retrieval"</span><span class="hl-1">, </span><span class="hl-3">"rag"</span><span class="hl-1">] },</span><br/><span class="hl-1"> content: </span><span class="hl-3">"# Hybrid Retrieval</span><span class="hl-4">\n\n</span><span class="hl-3">BM25 + embeddings..."</span><span class="hl-1">,</span><br/><span class="hl-1"> overwrite: </span><span class="hl-4">false</span><br/><span class="hl-1">});</span><br/><span class="hl-1">console.</span><span class="hl-2">log</span><span class="hl-1">(r.path, r.bytes);</span>
|
|
17
|
+
</code><button type="button">Copy</button></pre>
|
|
18
|
+
|
|
19
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/52ba9286231d7f66006d59753ca569519957715a/src/tools/write.ts#L36">tools/write.ts:36</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.6.2</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>dataviewQuery | enquire-mcp API reference - v3.6.2</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.6.2</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">dataviewQuery</a></li></ul><h1>Function dataviewQuery</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="dataviewquery"><span class="tsd-kind-call-signature">dataviewQuery</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">rows</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><a href="#dataviewquery" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Run a Dataview-style DQL query against the vault.</p>
|
|
2
|
+
<p>Parses the input with the project's DQL frontend (see <code>src/dql.ts</code>) and
|
|
3
|
+
executes against the live vault index. Supports a subset of Dataview's
|
|
4
|
+
syntax: <code>TABLE</code> / <code>LIST</code> projections, <code>WHERE</code> clauses, <code>FROM "folder"</code> /
|
|
5
|
+
<code>FROM #tag</code> sources, <code>SORT</code>, <code>LIMIT</code>, <code>GROUP BY</code>. No formula evaluator —
|
|
6
|
+
pure field projection + boolean filters (formula evaluator deferred per
|
|
7
|
+
v3.6.0 non-goals).</p>
|
|
8
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault to query.</p>
|
|
9
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p><code>query</code> is the DQL string.</p>
|
|
10
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">rows</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span></h4><p><code>{ query, rows }</code> — <code>rows</code> is an array of objects keyed by the
|
|
11
|
+
projected fields.</p>
|
|
12
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the DQL fails to parse or references an unknown source.</p>
|
|
13
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">r</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">dataviewQuery</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> query: </span><span class="hl-3">'TABLE status, mtime FROM "Posts" WHERE status = "draft" SORT mtime DESC'</span><br/><span class="hl-1">});</span><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">row</span><span class="hl-1"> </span><span class="hl-0">of</span><span class="hl-1"> r.rows) console.</span><span class="hl-2">log</span><span class="hl-1">(row);</span>
|
|
14
|
+
</code><button type="button">Copy</button></pre>
|
|
15
|
+
|
|
16
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/52ba9286231d7f66006d59753ca569519957715a/src/tools/read.ts#L472">tools/read.ts:472</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.6.2</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>embeddingsSearch | enquire-mcp API reference - v3.6.2</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.6.2</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">embeddingsSearch</a></li></ul><h1>Function embeddingsSearch</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="embeddingssearch"><span class="tsd-kind-call-signature">embeddingsSearch</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">hypothetical_answer</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">min_score</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">model</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">embedFile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">hnsw</span><span class="tsd-signature-symbol">?:</span> <a href="../interfaces/tools.HnswSearchContext.html" class="tsd-signature-type tsd-kind-interface">HnswSearchContext</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.EmbedSearchResponse.html" class="tsd-signature-type tsd-kind-interface">EmbedSearchResponse</a><span class="tsd-signature-symbol">></span><a href="#embeddingssearch" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>ML embeddings retrieval — k-NN over a persistent vector index.</p>
|
|
2
|
+
<p>Hits a <code>.embed.db</code> (SQLite) built by <code>enquire-mcp build-embeddings</code>. The
|
|
3
|
+
index is <strong>opt-in and out-of-band</strong>: this function lazy-loads the
|
|
4
|
+
<code>@huggingface/transformers</code> runtime + the embedder model only when called.
|
|
5
|
+
If the user hasn't run <code>build-embeddings</code>, returns a clean error pointing
|
|
6
|
+
to the setup command instead of blocking inside model load.</p>
|
|
7
|
+
<p>Supports HyDE (Hypothetical Document Embeddings, Gao et al 2023): pass
|
|
8
|
+
<code>hypothetical_answer</code> and that text is embedded instead of <code>query</code> —
|
|
9
|
+
typically +2-5 NDCG@10 on under-specified queries. Optional HNSW
|
|
10
|
+
acceleration (sub-10ms k-NN at any scale) when an <a href="../interfaces/tools.HnswSearchContext.html" class="tsd-kind-interface">HnswSearchContext</a>
|
|
11
|
+
is provided; otherwise falls back to brute-force cosine in <code>EmbedDb</code>.</p>
|
|
12
|
+
<p>Privacy contract: hits are filtered through <code>vault.isExcluded()</code> before
|
|
13
|
+
return — entries in the <code>.embed.db</code> for paths now matched by
|
|
14
|
+
<code>--exclude-glob</code> / <code>--read-paths</code> never leak through.</p>
|
|
15
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault. Used for path-exclusion filtering and to error
|
|
16
|
+
on missing index with a guidance message.</p>
|
|
17
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">hypothetical_answer</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">min_score</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">model</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p><code>query</code> is required + non-empty. <code>limit</code> defaults to 10,
|
|
18
|
+
<code>min_score</code> to 0.3 (relatively high cosine floor — embeddings cosine
|
|
19
|
+
has a tighter distribution than TF-IDF). <code>model</code> overrides the
|
|
20
|
+
embedder alias. <code>hypothetical_answer</code> enables HyDE.</p>
|
|
21
|
+
</div><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">folder</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">hypothetical_answer</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>v3.1.0 — HyDE (Hypothetical Document Embeddings) augmentation.
|
|
22
|
+
When set, this string is embedded instead of <code>query</code>. The agent
|
|
23
|
+
generates a synthetic answer to its own question, embeds <em>that</em>,
|
|
24
|
+
and retrieves against the answer-shaped vector — typically beats
|
|
25
|
+
raw-query retrieval on under-specified queries by +2-5 NDCG@10.
|
|
26
|
+
The <code>query</code> string is still echoed in the response for caller
|
|
27
|
+
audit-trail; it does NOT influence retrieval when <code>hypothetical_answer</code>
|
|
28
|
+
is present.</p>
|
|
29
|
+
</div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">min_score</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">model</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li></ul></li><li><span><span class="tsd-kind-parameter">embedFile</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Absolute path to the <code>.embed.db</code>. Existence is checked
|
|
30
|
+
before any model load so the error message is fast and clear.</p>
|
|
31
|
+
</div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">hnsw</span>: <a href="../interfaces/tools.HnswSearchContext.html" class="tsd-signature-type tsd-kind-interface">HnswSearchContext</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></span><div class="tsd-comment tsd-typography"><p>Optional HNSW index context. When passed, k-NN routes
|
|
32
|
+
through HNSW instead of brute-force cosine.</p>
|
|
33
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.EmbedSearchResponse.html" class="tsd-signature-type tsd-kind-interface">EmbedSearchResponse</a><span class="tsd-signature-symbol">></span></h4><p>An <a href="../interfaces/tools.EmbedSearchResponse.html" class="tsd-kind-interface">EmbedSearchResponse</a> with chunk-level matches and a
|
|
34
|
+
<code>hyde: true</code> marker iff HyDE actually fired.</p>
|
|
35
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>query</code> is empty, the embed db doesn't exist, the
|
|
36
|
+
embedder fails to load, or returns no vectors for the query.</p>
|
|
37
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">result</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">embeddingsSearch</span><span class="hl-1">(</span><br/><span class="hl-1"> vault,</span><br/><span class="hl-1"> {</span><br/><span class="hl-1"> query: </span><span class="hl-3">"How do BM25 and embeddings compare on multilingual recall?"</span><span class="hl-1">,</span><br/><span class="hl-1"> limit: </span><span class="hl-4">10</span><span class="hl-1">,</span><br/><span class="hl-1"> hypothetical_answer: </span><span class="hl-3">"BM25 dominates on rare-term Latin queries..."</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> </span><span class="hl-3">"/path/to/vault.embed.db"</span><br/><span class="hl-1">);</span><br/><span class="hl-1">console.</span><span class="hl-2">log</span><span class="hl-1">(result.matches[</span><span class="hl-4">0</span><span class="hl-1">]?.path, result.hyde); </span><span class="hl-5">// true</span>
|
|
38
|
+
</code><button type="button">Copy</button></pre>
|
|
39
|
+
|
|
40
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/52ba9286231d7f66006d59753ca569519957715a/src/tools/search.ts#L860">tools/search.ts:860</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.6.2</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>findPath | enquire-mcp API reference - v3.6.2</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.6.2</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">findPath</a></li></ul><h1>Function findPath</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="findpath"><span class="tsd-kind-call-signature">findPath</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">follow_embeds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">from</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">from_title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">include_alternatives</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">max_depth</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">to</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">to_title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.FindPathResult.html" class="tsd-signature-type tsd-kind-interface">FindPathResult</a><span class="tsd-signature-symbol">></span><a href="#findpath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Find the shortest wikilink-graph path between two notes via BFS.</p>
|
|
2
|
+
<p>Multi-hop graph traversal — closes the gap the competitive audit
|
|
3
|
+
surfaced ("find paths between concepts" was the most-praised graph
|
|
4
|
+
feature in competitor plugins). Returns the shortest path up to
|
|
5
|
+
<code>max_depth</code> hops; with <code>include_alternatives: true</code>, also returns up
|
|
6
|
+
to 10 same-length alternatives (useful for "show me different
|
|
7
|
+
connections").</p>
|
|
8
|
+
<p>Uses the shared <code>EntryIndex</code> (basename → entries map) for O(1) target
|
|
9
|
+
resolution per hop, so repeat calls in a session reuse the index.
|
|
10
|
+
v1.8.1 perf fix: builds a <code>relPath → entry</code> map once before BFS
|
|
11
|
+
(pre-fix was O(N²) per visited node).</p>
|
|
12
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault.</p>
|
|
13
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">follow_embeds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">from</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">from_title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">include_alternatives</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">max_depth</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">to</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">to_title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p>One of <code>from</code> / <code>from_title</code> and one of <code>to</code> / <code>to_title</code>
|
|
14
|
+
required. <code>max_depth</code> defaults to 5. <code>include_alternatives</code> defaults
|
|
15
|
+
to false. <code>follow_embeds</code> defaults to true (include <code>![[embeds]]</code> as
|
|
16
|
+
edges).</p>
|
|
17
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.FindPathResult.html" class="tsd-signature-type tsd-kind-interface">FindPathResult</a><span class="tsd-signature-symbol">></span></h4><p>A <a href="../interfaces/tools.FindPathResult.html" class="tsd-kind-interface">FindPathResult</a>. When <code>found: false</code>, <code>path: []</code> and
|
|
18
|
+
<code>hops: -1</code>.</p>
|
|
19
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If from / to can't be resolved.</p>
|
|
20
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">r</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">findPath</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> from_title: </span><span class="hl-3">"Attention"</span><span class="hl-1">,</span><br/><span class="hl-1"> to_title: </span><span class="hl-3">"RLHF"</span><span class="hl-1">,</span><br/><span class="hl-1"> max_depth: </span><span class="hl-4">4</span><br/><span class="hl-1">});</span><br/><span class="hl-0">if</span><span class="hl-1"> (r.found) {</span><br/><span class="hl-1"> console.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-3">`${</span><span class="hl-1">r</span><span class="hl-3">.</span><span class="hl-1">hops</span><span class="hl-3">} hops:`</span><span class="hl-1">, r.path.</span><span class="hl-2">map</span><span class="hl-1">(</span><span class="hl-6">s</span><span class="hl-1"> </span><span class="hl-0">=></span><span class="hl-1"> s.title).</span><span class="hl-2">join</span><span class="hl-1">(</span><span class="hl-3">" → "</span><span class="hl-1">));</span><br/><span class="hl-1">}</span>
|
|
21
|
+
</code><button type="button">Copy</button></pre>
|
|
22
|
+
|
|
23
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/52ba9286231d7f66006d59753ca569519957715a/src/tools/meta.ts#L827">tools/meta.ts:827</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.6.2</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>findSimilar | enquire-mcp API reference - v3.6.2</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.6.2</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">findSimilar</a></li></ul><h1>Function findSimilar</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="findsimilar"><span class="tsd-kind-call-signature">findSimilar</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">min_score</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.SimilarNote.html" class="tsd-signature-type tsd-kind-interface">SimilarNote</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#findsimilar" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Lexical-hybrid similarity over vault-native signals — finds notes related
|
|
2
|
+
to the target without any embeddings.</p>
|
|
3
|
+
<p>Combines four structural signals: tag Jaccard (×3.0), title character
|
|
4
|
+
3-gram Jaccard (×1.5), shared-outbound link overlap (×2.0), and co-backlink
|
|
5
|
+
Jaccard (×2.0). Tag overlap dominates by design — that's the strongest
|
|
6
|
+
"this is the same topic" signal a human would use. Skips body cosine on
|
|
7
|
+
purpose: structural signals converge fast at vault scale (5k × 5KB) without
|
|
8
|
+
a full TF-IDF pass per call.</p>
|
|
9
|
+
<p>Use this when the agent has <em>one specific note</em> and wants neighbors. For
|
|
10
|
+
"find notes about <topic>" use <a href="tools.searchHybrid.html" class="tsd-kind-function">searchHybrid</a> or <a href="tools.semanticSearch.html" class="tsd-kind-function">semanticSearch</a>.</p>
|
|
11
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault to search.</p>
|
|
12
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">min_score</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p>One of <code>path</code> or <code>title</code> is required to identify the target.
|
|
13
|
+
<code>limit</code> defaults to 10. <code>min_score</code> (default 0.05) prunes weak matches.</p>
|
|
14
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.SimilarNote.html" class="tsd-signature-type tsd-kind-interface">SimilarNote</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><p>Sorted <code>SimilarNote[]</code> (desc by <code>score</code>), capped at <code>limit</code>.
|
|
15
|
+
Empty array if the target was excluded by <code>--exclude-glob</code>.</p>
|
|
16
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If neither <code>path</code> nor <code>title</code> is provided, or the target
|
|
17
|
+
cannot be resolved.</p>
|
|
18
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">related</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">findSimilar</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> path: </span><span class="hl-3">"Reference/Hybrid Retrieval.md"</span><span class="hl-1">,</span><br/><span class="hl-1"> limit: </span><span class="hl-4">5</span><br/><span class="hl-1">});</span><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">n</span><span class="hl-1"> </span><span class="hl-0">of</span><span class="hl-1"> related) {</span><br/><span class="hl-1"> console.</span><span class="hl-2">log</span><span class="hl-1">(n.path, n.score, n.signals);</span><br/><span class="hl-1">}</span>
|
|
19
|
+
</code><button type="button">Copy</button></pre>
|
|
20
|
+
|
|
21
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/52ba9286231d7f66006d59753ca569519957715a/src/tools/search.ts#L234">tools/search.ts:234</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.6.2</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>frontmatterGet | enquire-mcp API reference - v3.6.2</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.6.2</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">frontmatterGet</a></li></ul><h1>Function frontmatterGet</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="frontmatterget"><span class="tsd-kind-call-signature">frontmatterGet</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">key</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">frontmatter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">unknown</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><a href="#frontmatterget" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Read a note's frontmatter — full map, or a single key's value.</p>
|
|
2
|
+
<p>The read-only counterpart to <code>frontmatterSet</code> (write side). Use this
|
|
3
|
+
before bulk-editing frontmatter so the agent can reason about current
|
|
4
|
+
state before issuing a write. When <code>key</code> is set, the response includes
|
|
5
|
+
the resolved <code>value</code> (which may be <code>undefined</code> if the key is absent).</p>
|
|
6
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault to read from.</p>
|
|
7
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">key</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p>One of <code>path</code> or <code>title</code> is required. <code>key</code> narrows the
|
|
8
|
+
response to a single value.</p>
|
|
9
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">frontmatter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">unknown</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span></h4><p><code>{ path, frontmatter, value? }</code> — <code>value</code> is only included when
|
|
10
|
+
<code>key</code> is set.</p>
|
|
11
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the target can't be resolved.</p>
|
|
12
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">// Read all frontmatter</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">all</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">frontmatterGet</span><span class="hl-1">(vault, { path: </span><span class="hl-3">"Posts/Article.md"</span><span class="hl-1"> });</span><br/><br/><span class="hl-5">// Read a single key</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">just</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">frontmatterGet</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> path: </span><span class="hl-3">"Posts/Article.md"</span><span class="hl-1">,</span><br/><span class="hl-1"> key: </span><span class="hl-3">"status"</span><br/><span class="hl-1">});</span><br/><span class="hl-1">console.</span><span class="hl-2">log</span><span class="hl-1">(just.value); </span><span class="hl-5">// → "draft"</span>
|
|
13
|
+
</code><button type="button">Copy</button></pre>
|
|
14
|
+
|
|
15
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/52ba9286231d7f66006d59753ca569519957715a/src/tools/read.ts#L1028">tools/read.ts:1028</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.6.2</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>frontmatterSearch | enquire-mcp API reference - v3.6.2</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.6.2</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">frontmatterSearch</a></li></ul><h1>Function frontmatterSearch</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="frontmattersearch"><span class="tsd-kind-call-signature">frontmatterSearch</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/tools.FrontmatterSearchArgs.html" class="tsd-signature-type tsd-kind-interface">FrontmatterSearchArgs</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">matches</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">mtime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">total_matches</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><a href="#frontmattersearch" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Find every note whose frontmatter matches a predicate.</p>
|
|
2
|
+
<p>Useful as a precursor to bulk operations like <a href="tools.frontmatterSet.html" class="tsd-kind-function">frontmatterSet</a>:
|
|
3
|
+
"find all notes with <code>status: draft</code> and set their status to <code>published</code>",
|
|
4
|
+
or "find notes whose <code>aliases</code> array contains a typo". Single predicate
|
|
5
|
+
per call by design — combine with multiple calls if you need AND/OR logic.</p>
|
|
6
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault to scan.</p>
|
|
7
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <a href="../interfaces/tools.FrontmatterSearchArgs.html" class="tsd-signature-type tsd-kind-interface">FrontmatterSearchArgs</a></span><div class="tsd-comment tsd-typography"><p><a href="../interfaces/tools.FrontmatterSearchArgs.html" class="tsd-kind-interface">FrontmatterSearchArgs</a>. <code>key</code> is required and
|
|
8
|
+
exactly one of <code>equals</code> / <code>exists</code> / <code>contains</code> must be set.</p>
|
|
9
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">matches</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">mtime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">total_matches</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span></h4><p><code>{ key, total_matches, matches }</code> — <code>total_matches</code> equals
|
|
10
|
+
<code>matches.length</code> (counts the truncated result, not the full count).</p>
|
|
11
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>key</code> is empty or the predicate count is not exactly 1.</p>
|
|
12
|
+
</div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-1">Throws<a href="#throws-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>folder</code> resolves outside the vault.</p>
|
|
13
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">// Find every draft</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">drafts</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">frontmatterSearch</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> key: </span><span class="hl-3">"status"</span><span class="hl-1">,</span><br/><span class="hl-1"> equals: </span><span class="hl-3">"draft"</span><span class="hl-1">,</span><br/><span class="hl-1"> limit: </span><span class="hl-4">50</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// Find every note whose `aliases` array contains "RAG"</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">rag</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">frontmatterSearch</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> key: </span><span class="hl-3">"aliases"</span><span class="hl-1">,</span><br/><span class="hl-1"> contains: </span><span class="hl-3">"RAG"</span><br/><span class="hl-1">});</span>
|
|
14
|
+
</code><button type="button">Copy</button></pre>
|
|
15
|
+
|
|
16
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/52ba9286231d7f66006d59753ca569519957715a/src/tools/read.ts#L1099">tools/read.ts:1099</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.6.2</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>frontmatterSet | enquire-mcp API reference - v3.6.2</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.6.2</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">frontmatterSet</a></li></ul><h1>Function frontmatterSet</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="frontmatterset"><span class="tsd-kind-call-signature">frontmatterSet</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/tools.FrontmatterSetArgs.html" class="tsd-signature-type tsd-kind-interface">FrontmatterSetArgs</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">after</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">before</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">changed_keys</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">dry_run</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><a href="#frontmatterset" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Atomic YAML frontmatter mutation — set, update, or delete keys via a
|
|
2
|
+
gray-matter round-trip.</p>
|
|
3
|
+
<p>Replaces the error-prone "find/replace YAML text" pattern. Parses the
|
|
4
|
+
frontmatter, applies the diff, re-serializes via js-yaml (so date-like
|
|
5
|
+
strings, multi-line values, pipe-containing strings, etc. stay correct).
|
|
6
|
+
Reports per-key change markers in <code>changed_keys</code>: <code>"+key"</code> for added,
|
|
7
|
+
<code>"~key"</code> for updated, <code>"-key"</code> for deleted. No-op writes (every value
|
|
8
|
+
already matches) are skipped — the response still reports the empty diff.
|
|
9
|
+
WRITE TOOL — only registered with <code>--enable-write</code>.</p>
|
|
10
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault. Must allow writes.</p>
|
|
11
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <a href="../interfaces/tools.FrontmatterSetArgs.html" class="tsd-signature-type tsd-kind-interface">FrontmatterSetArgs</a></span><div class="tsd-comment tsd-typography"><p><a href="../interfaces/tools.FrontmatterSetArgs.html" class="tsd-kind-interface">FrontmatterSetArgs</a>. <code>set</code> must be non-empty.</p>
|
|
12
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">after</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">before</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">changed_keys</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">dry_run</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span></h4><p><code>{ path, changed_keys, before, after, dry_run }</code> — <code>before</code>
|
|
13
|
+
and <code>after</code> are the full frontmatter maps so the caller can diff.</p>
|
|
14
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>set</code> is empty, vault is read-only, or target can't
|
|
15
|
+
be resolved.</p>
|
|
16
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">// Mark a draft as published, set a date, delete a stale key</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">frontmatterSet</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> path: </span><span class="hl-3">"Posts/Article.md"</span><span class="hl-1">,</span><br/><span class="hl-1"> set: {</span><br/><span class="hl-1"> status: </span><span class="hl-3">"published"</span><span class="hl-1">,</span><br/><span class="hl-1"> published_at: </span><span class="hl-3">"2026-05-15"</span><span class="hl-1">,</span><br/><span class="hl-1"> draft_notes: </span><span class="hl-4">null</span><span class="hl-1"> </span><span class="hl-5">// deletes the key</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span>
|
|
17
|
+
</code><button type="button">Copy</button></pre>
|
|
18
|
+
|
|
19
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/52ba9286231d7f66006d59753ca569519957715a/src/tools/write.ts#L375">tools/write.ts:375</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.6.2</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>getBacklinks | enquire-mcp API reference - v3.6.2</title><meta name="description" content="Documentation for enquire-mcp API reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">enquire-mcp API reference - v3.6.2</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/tools.html">tools</a></li><li><a href="" aria-current="page">getBacklinks</a></li></ul><h1>Function getBacklinks</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getbacklinks"><span class="tsd-kind-call-signature">getBacklinks</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">vault</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Vault</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">include_embeds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.BacklinkHit.html" class="tsd-signature-type tsd-kind-interface">BacklinkHit</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#getbacklinks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Find every note that links to the target — the "who references this?"
|
|
2
|
+
query.</p>
|
|
3
|
+
<p>Scans the full vault, so cost is O(N notes × parse). Use <a href="tools.getNoteNeighbors.html" class="tsd-kind-function">getNoteNeighbors</a>
|
|
4
|
+
if you also need outbound links + tag siblings in one call. Sorted by
|
|
5
|
+
<code>count</code> desc (most-linking notes first).</p>
|
|
6
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">vault</span>: <span class="tsd-signature-type">Vault</span></span><div class="tsd-comment tsd-typography"><p>The vault to search.</p>
|
|
7
|
+
</div></li><li><span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">include_embeds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">limit</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">path</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">title</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p>One of <code>path</code> or <code>title</code> is required to identify the target.
|
|
8
|
+
<code>limit</code> defaults to 50. <code>include_embeds</code> defaults to <code>true</code> —
|
|
9
|
+
set false to count only <code>[[wikilinks]]</code> and skip <code>![[embeds]]</code>.</p>
|
|
10
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/tools.BacklinkHit.html" class="tsd-signature-type tsd-kind-interface">BacklinkHit</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><p>A <a href="../interfaces/tools.BacklinkHit.html" class="tsd-kind-interface">BacklinkHit</a> array sorted by <code>count</code> desc.</p>
|
|
11
|
+
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the target can't be resolved.</p>
|
|
12
|
+
</div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">backlinks</span><span class="hl-1"> </span><span class="hl-0">=</span><span class="hl-1"> </span><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">getBacklinks</span><span class="hl-1">(vault, {</span><br/><span class="hl-1"> path: </span><span class="hl-3">"Concepts/Vector Embeddings.md"</span><span class="hl-1">,</span><br/><span class="hl-1"> limit: </span><span class="hl-4">25</span><br/><span class="hl-1">});</span><br/><span class="hl-0">for</span><span class="hl-1"> (</span><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-4">b</span><span class="hl-1"> </span><span class="hl-0">of</span><span class="hl-1"> backlinks) {</span><br/><span class="hl-1"> console.</span><span class="hl-2">log</span><span class="hl-1">(</span><span class="hl-3">`${</span><span class="hl-1">b</span><span class="hl-3">.</span><span class="hl-1">path</span><span class="hl-3">} links ${</span><span class="hl-1">b</span><span class="hl-3">.</span><span class="hl-1">count</span><span class="hl-3">}x:`</span><span class="hl-1">, b.snippets);</span><br/><span class="hl-1">}</span>
|
|
13
|
+
</code><button type="button">Copy</button></pre>
|
|
14
|
+
|
|
15
|
+
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/oomkapwn/enquire-mcp/blob/52ba9286231d7f66006d59753ca569519957715a/src/tools/read.ts#L400">tools/read.ts:400</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">enquire-mcp API reference - v3.6.2</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|