get_document_bundle
Retrieve a document's structured bundle: citation packet, outline, backlinks, forward links, and recent edits. Supports one-hop link depth.
Instructions
Document-tree retrieval. Returns a structured bundle for a single document: { anchor (citation packet + optional status/superseded_by), outline (section tree via buildOutlineTree — same shape as get_outline.root), backlinks (citation packets + property_snippet + relation:"wikilink"), forward_links (same shape; broken links omitted), recent_edits (≤10 most recent audit_log rows mapped to {at, op, client_id, is_memory_sink_write?}) }. Every citation packet is the full 8-field D-01 shape from src/memory/citation-packet.ts. v2.0.0 accepts only depth:1 (one-hop links); the field is zod-pinned to z.literal(1) for forward compatibility. recent_edits is keyed by the anchor's CURRENT note path — pre-rename history is preserved in audit_log but not surfaced here (Phase 4 widens). Unknown doc_id returns { isError: true, error: "doc_not_found", doc_id }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | Opaque DocId (obsidian-fs://<vault>/<path>) of the anchor document | |
| depth | No | Link-walk depth. v2.0.0: only 1 (one-hop). Phase 4 may widen. | |
| vaults | No | Optional vault filter; usually omitted (the DocId names a vault) |