Local-first, markdown-native memory system for AI agents. Exposes Palace memory as MCP tools for Claude Code and other MCP clients via stdio transport. Supports hybrid search, semantic recall, and trust-based record management.
PAL-MEM exposes 5 well-named tools with clear, domain-specific descriptions (avg 180 chars). All tools have explicit input schemas with Zod validation and type definitions. However, output schemas are undocumented, responses are returned as unstructured text via asText() helper, forcing LLMs to parse JSON strings. Error handling is minimal (generic asError wrapper). Parameter descriptions are solid but lack format constraints (e.g., ISO date format for 'since' param not formally specified). Tool composition is clean (each does one thing), but no pagination support for recall/search despite potentially large result sets.
Call at the start of a session to get a ranked context bundle from Palace memory: project records, recent sessions, recent episodics, relevant procedurals, and entities. Returns abstracts (~200 tokens each) bounded by maxTokens. Drops, never truncates.
Soft-archive a Palace record by ID. Moves the record (and its .emb sidecar) to archive/ — recoverable, not deleted.
Top-K records ranked by hybrid score (cosine + keyword + recency + access). Use when you need prior context relevant to a specific question.
Call when you make a durable decision, discover a bug worth remembering, or complete a task. Body should be self-contained prose — future sessions will retrieve via abstract + embedding. Abstract and embedding are generated asynchronously by the next palace abstract/embed pass. Trust + ephemeral options apply Phase 4 protections: secrets are redacted before write, prompt-injection patterns auto-flag review_required, low-trust records are excluded from bootstrap by default, ephemeral records auto-archive after ttlDays.
Like palace_recall but returns more results and is intended for open-ended exploration. Same scoring, k defaults to 10.
Output schemas undocumented. All responses wrapped in asText() return unstructured JSON strings, not typed objects. LLMs cannot predict response structure for downstream planning.
No pagination support. palace_recall and palace_search return top-K results but lack offset/limit or cursor parameters. Large result sets risk context window exhaustion.
Error handling is generic. asError() returns plain text without recovery guidance. LLMs cannot determine if errors are retryable, user-fixable, or fatal.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
Parameter format constraints not formalized. 'since' param accepts ISO date strings but no regex pattern or format declaration in schema. LLMs may pass invalid dates.
Deprecated parameter 'includeLowTrust' still accepted in all tools. Migration path unclear, should be removed after deprecation window closes.