Get Memory
vault_get_memoryRetrieve user preferences, principles, and opinions from structured memory files, with optional filtering by section or date for targeted context.
Instructions
Read semantic memory from About Me/ files. These are structured memory files containing dated bullet entries organized under H2 headings. With file: single file content. With file+section: just that H2 section's entries. No args: all files concatenated (frontmatter stripped) — can be large. Returns empty string when no memory files exist yet.
With file+on_or_after: returns structured JSON entries dated on or after the boundary date (inclusive), in document order (newest first when the file lists new entries at the top, the default). Add section to scope to one H2 section; omit it to read every H2 section's entries in the file, each keeping its section attribution. Designed for reconciliation consumers that know a boundary date and need deterministic chronological coverage without re-parsing the section.
Example: vault_get_memory({ file: "Principles", section: "Decision heuristics (newest first)" }) Example: vault_get_memory({ file: "Opinions", section: "Code patterns", on_or_after: "2026-09-01" }) Example: vault_get_memory({ file: "Opinions", on_or_after: "2026-09-01" }) — every section's entries since the date
When to use: Reading user preferences, principles, opinions, or other persistent context stored in About Me/ files. Call vault_list_memory_files first to discover valid file and section names. Use on_or_after when you need entries from a known date forward (e.g. reconciliation boundaries). Prefer vault_read_note for reading non-memory notes.
Errors:
"section requires a file" — section was provided without file; pass both or just file
"on_or_after requires a file" — on_or_after needs a file to scope the filter
"memory file not found" — file does not exist in About Me/; call vault_list_memory_files to discover valid names
"memory file must not start with a dot" — a dot-prefixed name would be a hidden file; memory files are always visible notes
"section not found: …" — no H2 heading matches; the error lists the file's available sections
"date must be a real ISO calendar date" — on_or_after must be a valid YYYY-MM-DD date
Returns: Without on_or_after, raw markdown text. With on_or_after, JSON { entries, total, on_or_after } where each entry is { file, section, date, text } — text is the full raw entry markdown (bullet + continuation lines, wikilinks intact), same shape as vault_memory_recall entries. An empty match returns { entries: [], total: 0 }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Memory file name without .md (e.g. "Principles", "Opinions") | |
| section | No | H2 section heading (e.g. "Decision heuristics (newest first)"). Matched case-insensitively, with or without the "(newest first)" suffix. Omit to read the whole file (with on_or_after, every H2 section's entries). Call vault_list_memory_files first to discover valid names. | |
| on_or_after | No | Inclusive date filter (YYYY-MM-DD). When provided with file, returns structured JSON entries dated on or after this date instead of raw markdown. Requires a file; add section to scope to one H2 section. |