get_graph
Retrieve a knowledge graph of notes, including wikilink edges and semantic similarity connections. Scope by folder or note neighborhood to explore relationships and identify unresolved links.
Instructions
Get the knowledge graph: note nodes, directed edges from [[wikilinks]], and undirected semantic_edges (embedding cosine similarity) between related notes that may lack explicit links. Nodes are {id, t} (t = title); edges and semantic_edges reference nodes by their position in the nodes array (not id) — ["edges"][0] = [2, 5] means nodes[2] links to nodes[5], and a semantic_edges triple's third number is the cosine score. unresolved_links lists [[wikilink]] targets in this scope that match no note title — dangling links, not edges (no node index, since there is no node to point at); rename the target or fix the link text to resolve one. Unfiltered, this returns the ENTIRE vault in one response — fine for small vaults, but it will stop fitting in context as the vault grows. Scope it with folder_id (a subtree) or root_title+depth (the neighborhood around one note) when you only need part of the graph. Node titles in the result are valid [[wikilink]] targets — but only within whatever scope you asked for.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Hop count for root_title; ignored without it | |
| folder_id | No | Restrict to notes in this folder and its descendant folders | |
| min_score | No | Cosine floor for semantic_edges — lower to see more (noisier) edges | |
| root_title | No | Keep only nodes within `depth` wikilink-hops of this note (case-insensitive) | |
| unresolved_only | No | If true, return only { unresolved_links } without nodes and edges (fast check for broken links) | |
| include_semantic | No | Include semantic_edges at all |