readDocument
Read a single vault document by path or document UID to retrieve its title, body, frontmatter, tags, wikilinks, backlinks, and parsed observations for graph-based recall and provenance.
Instructions
Read one vault document by path or documentUid: its title, verbatim body, frontmatter, tags, its wikilink edges — links (what it references: mentions of entities, links_to other docs) and backlinks (what references it) — and observations (the - [category] text lines parsed from the body). Each observation is projected to a durable fact ON THIS DOCUMENT ENTITY, so query them with get(entities/{documentUid}) or maz fact get <documentUid>. A document is also an entity, so the returned document.name (entities/{uid}) pivots straight into neighbors/relations to walk the unified graph.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Vault-relative path of the document, e.g. notes/project-alpha.md. Provide this OR documentUid (exactly one). | |
| documentUid | No | Stable document UID (= its entity UID). Provide this OR path (exactly one). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| links | Yes | Outgoing wikilink edges (what this note references): mentions → entities, links_to → other documents. Always present; [] when none. | |
| document | Yes | The document: path, title, verbatim body, frontmatter, tags, pinned. The name field is the entities/{uid} resource name for pivoting to neighbors/relations. | |
| backlinks | Yes | Incoming edges (what references this note). Always present; [] when none. | |
| observations | Yes | Structured observations parsed from the body ('- [category] text #tag (context)' lines). EACH is projected to a durable fact on THIS document entity — query them with get(entities/{documentUid}) or 'maz fact get <documentUid>'. Always present; [] when none. | |
| unresolvedLinks | Yes | Target names of [[wikilinks]] in the body that resolve to nothing in the graph (dead links). These have NO edge in 'links' precisely because they did not resolve; surface them to flag a broken reference. Always present; [] when none. |