Toon Memory
v4.5.0Offline persistent memory for AI coding agents — 42 tools, 80% fewer calls, no LLM
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
memory_remember Save to Memory
Save a fact to the project's persistent memory (decisions, patterns, bugs, knowledge). Persists between sessions. Tags: 'private' excludes from context injection; 'superseded' marks as obsolete.
| Parameter | Type | Description |
|---|---|---|
category * | string | Category of the fact. 'warning' = negative memory ('NO hacer esto, rompe X') — recalled with a boost so past mistakes surface first. |
content * | string | Detailed content of the fact |
key * | string | Short title in kebab-case (e.g. risk-engine-priority) |
file | string | Related file or line (e.g. spec.md:145) |
importance | string | Explicit importance level — critical/high entries surface first in recall, low last. Omit for auto (recency + frequency). |
links | string | Related entry keys, separated by space or ';' (e.g. risk-spec engine-arch). Builds graph edges. |
origin | string | Who created this entry. |
path_scope | string | Glob pattern to scope this entry (e.g. src/**.ts). Empty = global. |
tags | string | Semicolon-separated tags (e.g. risk;spec) |
ttl | string | Time to live (e.g. 7d, 2026-07-17). Empty = no expiration |
memory_recall Search Memory
Search the project's persistent memory. Returns relevant entries. Use BEFORE reading files. Pattern: recall → context_diff for recent changes → capture to save observations.
| Parameter | Type | Description |
|---|---|---|
as_of | string | Temporal view (YYYY-MM-DD): return entries valid on that date. Superseded entries still appear if they were active then. |
bias | string | 'session': boost entries whose file matches current session files. 'none': no bias (default). |
budget | string | 'tiny': key+1 line (~50 tokens). 'normal': compact with tags/edges. 'deep': all fields (default). Overrides 'compact'. |
budget_tokens | integer | Deterministic token budget: include entries until the estimated output reaches ~N tokens (overrides limit). |
category | string | Filter by category (empty = all) |
compact | boolean | Token-efficient output: numeric indices (1, 2), omits id/date/file (keeps tags). Does not mutate .toon file. |
explain | boolean | Append a 'why this entry' line to each result (relevance %, times used, last used, importance). No LLM — pure heuristics. |
from_date | string | Start date filter (YYYY-MM-DD or relative like 'ayer', 'la semana pasada', '7d') |
hops | integer | Graph depth in 'graph' mode (1 or 2). Default 1. |
ids | string | Batch fetch: comma/space/;-separated entry ids or keys, rendered in the given order (unknown entries skipped). Complements mode:'index' — layer 2 of progressive disclosure. Overrides mode. |
limit | integer | Maximum entries returned. Default 6 (15 in 'index' mode). Keeps token cost low. |
mode | string | 'flat' = keyword search (default). 'graph' = graph-based recall: expands the related-entry subgraph from matches (more precise, fewer tokens). 'index' = one line per entry (key, id, category, date, re… |
path_scope | string | Glob pattern to filter entries by path scope (e.g. 'src/**.ts'). |
query | string | Text to search for (optional when mode:'index' or ids is given) |
rrf | boolean | Use Reciprocal Rank Fusion (BM25x3 + centrality ranks, adaptive k=sqrtN) instead of weighted linear scoring. Weight-free: reaches parity with the tuned linear scorer on scripts/bench-rrf.mjs. |
sessionBias | boolean | Alias of bias:'session' (documented in older READMEs). |
since | string | Alias of from_date with natural-language dates. |
to_date | string | End date filter (YYYY-MM-DD) |
today | string | Alias of as_of (documented in older changelogs). |
memory_forget Forget from Memory
Lifecycle operations for a memory entry: soft (default) marks it obsolete and hides it from recalls, hard permanently removes it, restore brings it back to active, supersede retires it with a typed superseded_by edge to a newer entry.
| Parameter | Type | Description |
|---|---|---|
key * | string | Key or id of the entry |
action | string | soft: mark obsolete (default). hard: permanently remove. restore: bring an obsolete entry back to active. supersede: mark obsolete with a superseded_by link to new_key. |
new_key | string | Replacement entry key or id (only used with action: supersede). |
reason | string | Optional note appended to the old entry (only used with action: supersede). |
memory_smart_recall Smart Recall (Unified)
Unified retrieval: combines BM25 + graph + decay + quality in a single call. Use at the START of each task to get all relevant memory context. Then use context_diff for recent changes, context_focus for deep dives.
| Parameter | Type | Description |
|---|---|---|
intent * | string | Describe what you need to know (e.g. 'database schema for backend') |
bias | string | 'session': boost entries whose file matches current session files. 'none': no bias (default). |
budget_tokens | integer | Deterministic token budget: include entries until the estimated output reaches ~N tokens (overrides limit). |
category | string | Filter by category (empty = all) |
explain | boolean | Append a 'why this entry' line to each result (relevance %, times used, last used, importance). No LLM — pure heuristics. |
limit | integer | Maximum entries to return |
rrf | boolean | Use Reciprocal Rank Fusion (BM25x3 + centrality ranks, adaptive k=sqrtN) instead of weighted linear scoring. Weight-free: reaches parity with the tuned linear scorer on scripts/bench-rrf.mjs. |
memory_summary File Summary
Save or retrieve a summary of a large file to save tokens.
| Parameter | Type | Description |
|---|---|---|
action * | string | get to read, set to save |
file * | string | File path |
summary | string | File summary (only for set) |
memory_captured List Captured Activity
Show activity log captured automatically by hooks (only if capture is enabled). Useful for promoting observations to memory with memory_remember.
| Parameter | Type | Description |
|---|---|---|
clear | boolean | If true, clears the capture log |
file | string | Filter by file |
limit | integer | Maximum observations to show |
tool | string | Filter by tool name |
context_brief Context Briefing
Generate a compact context briefing: relevant memory + active sessions + project health. Single call instead of 5-6 separate calls. Zero LLM, pure deterministic logic.
| Parameter | Type | Description |
|---|---|---|
budget | integer | Token ceiling for the handoff packet when handoff=true. |
handoff | boolean | Prepend the compact handoff packet with identity, freshness, directives, traps and file pointers. |
limit | integer | Maximum relevant entries to show |
task | string | Current agent task. If provided, entries are ranked by relevance to this task. If empty, shows top entries by importance. |
context_compile Compile Task Context
Compile a task into a tiny context packet: directives, constraints, relevant memory, decisions, retrieval queries, hydrate keys, files and sessions. Deterministic, zero LLM, feedback-aware. Prefer this over context_brief when a task is known.
| Parameter | Type | Description |
|---|---|---|
task * | string | Current agent task or question |
budget | integer | Token ceiling for the compiled packet |
context_hydrate Hydrate Compressed Context
Expand hydrate keys emitted by context_compile into full memory entries. Layer 2 of progressive disclosure.
| Parameter | Type | Description |
|---|---|---|
keys * | array | Keys or ids from context_compile's Hydrate section |
memory_checkpoint Session Checkpoint
Save or update a session checkpoint with 7-day TTL. Creates a knowledge entry snapshot of the current session state. Same session = upsert (single checkpoint per session). Auto-expires.
| Parameter | Type | Description |
|---|---|---|
note | string | Optional summary of what was accomplished in this session. |
memory_feedback Feedback on recalled memory
Tell toon-memory whether a recalled entry was useful, irrelevant, outdated or wrong. Explicit feedback adjusts learned utility; 'wrong' also flags evidence as conflict. Use this after acting on a recalled memory.
| Parameter | Type | Description |
|---|---|---|
key * | string | Key or id of the entry you used |
signal * | string | useful | irrelevant | outdated | wrong |
task | string | Short description of the task where the memory was used |
memory_search Unified Search
Search memory with combined filters: text query, category, tags, and date range. Returns ranked results.
| Parameter | Type | Description |
|---|---|---|
query * | string | Text to search for |
as_of | string | Temporal view (YYYY-MM-DD): return entries valid on that date. |
bias | string | 'session': boost entries whose file matches current session files. 'none': no bias (default). |
budget | string | 'tiny': key+1 line (~50 tokens). 'normal': compact with tags/edges. 'deep': all fields (default). Overrides 'compact'. |
category | string | Filter by category (empty = all) |
compact | boolean | Token-efficient output |
from_date | string | Start date filter (YYYY-MM-DD or relative like 7d) |
hops | integer | Graph depth in 'graph' mode (1 or 2). Default 1. |
limit | integer | Maximum entries to return |
mode | string | 'flat' = keyword search (default). 'graph' = graph-based recall. |
path_scope | string | Glob pattern to filter entries by path scope (e.g. 'src/**.ts'). |
rrf | boolean | Use Reciprocal Rank Fusion (BM25x3 + centrality ranks, adaptive k=sqrtN) instead of weighted linear scoring. Weight-free: reaches parity with the tuned linear scorer on scripts/bench-rrf.mjs. |
tags | string | Semicolon-separated tags; entry must have ALL specified tags |
to_date | string | End date filter (YYYY-MM-DD) |
memory_promote Promote Observations
Heuristic auto-promote from the capture log (no LLM). Each observation gets a deterministic confidence score; high-confidence ones promote as active entries, low-confidence (≤ minConfidence) become reviewable drafts. Opt-in: run with dryRun: true first.
| Parameter | Type | Description |
|---|---|---|
days | integer | Only consider observations from the last N days. |
dryRun | boolean | If true, only preview what would be promoted (no writes). |
max | integer | Maximum observations to promote. |
minConfidence | number | Observations at or below this confidence become drafts; above it become active entries. |