sapience-mcp
v0.2.1Human-like memory and a judgment ledger for AI — an MCP server for Claude Code.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_memory
Search the memory system by semantic similarity. Use this at the start of any topic-specific conversation to surface relevant context, prior decisions, and evolved thinking — without being asked. Returns memories ranked by relevance × salience.
| Parameter | Type | Description |
|---|---|---|
query * | string | Natural language query describing what context you need |
namespace | string | Namespace to search. Omit for this server's namespace; '*' searches every namespace. |
top_k | integer | Number of memories to return (default 6) |
types | array | Filter by memory type. Options: ['episodic', 'feedback', 'project', 'reference', 'semantic', 'user']. Omit to search all. |
save_memory
Save a new memory. Use this to record decisions made, insights surfaced, how the user's thinking has evolved, feedback given, or important context from this conversation.
| Parameter | Type | Description |
|---|---|---|
content * | string | The memory content — be specific and self-contained |
memory_type * | string | Type of memory. One of: ['episodic', 'feedback', 'project', 'reference', 'semantic', 'user'] |
namespace | string | Namespace to save into. Omit for this server's namespace. |
salience | number | Importance weight 0.0–1.0. High-stakes decisions = 0.9+. Routine context = 0.3–0.5. |
source | string | Where this came from |
topic | string | Primary topic tag (e.g. 'product-launch', 'hiring', 'q3-planning') |
get_context_brief
Get a synthesized brief on a topic — what is known, how thinking has evolved, and what open questions remain. Use before deep-diving into any recurring topic like web onboarding tests, the stock portfolio, or an M&A situation.
| Parameter | Type | Description |
|---|---|---|
topic * | string | The topic to brief on (e.g. 'web onboarding', 'stock portfolio') |
top_k | integer | How many memories to pull for synthesis (default 10) |
consolidate
Run the consolidation job: extract semantic patterns from recent episodic memories. Run this at the end of sessions covering important topics. This is what makes the memory system get smarter over time.
| Parameter | Type | Description |
|---|---|---|
days_back | integer | How many days of episodic memory to consolidate (default 7) |
namespace | string | Namespace to consolidate. Omit for this server's namespace; '*' consolidates every namespace. |
list_memories
List recent memories, optionally filtered by type.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
memory_type | string | Filter by type. One of: ['episodic', 'feedback', 'project', 'reference', 'semantic', 'user']. Omit for all. |
namespace | string | Namespace to list. Omit for this server's namespace; '*' lists every namespace. |
memory_stats
Return total memory count and breakdown by type.
get_memory
Inspect a single memory by ID: full content plus all metadata (type, topic, salience, timestamps, access history, source). Use before editing or deleting to see exactly what's stored.
| Parameter | Type | Description |
|---|---|---|
memory_id * | string | Memory ID |
edit_memory
Edit a memory in place — fix wrong content, adjust salience, retag topic, or reclassify type. Only the fields you pass change; id, created_at, and access history are preserved. Content changes are re-embedded automatically.
| Parameter | Type | Description |
|---|---|---|
memory_id * | string | Memory ID to edit |
content | string | Replacement content (full text, not a diff) |
memory_type | string | New type. One of: ['episodic', 'feedback', 'project', 'reference', 'semantic', 'user'] |
salience | number | New importance weight 0.0–1.0 |
topic | string | New topic tag |
delete_memory
Permanently delete a single memory by ID. Irreversible — inspect it with get_memory first, and confirm with the user before deleting anything they didn't explicitly ask to remove.
| Parameter | Type | Description |
|---|---|---|
memory_id * | string | Memory ID to delete |
export_memories
Export memories to a JSONL file (one memory per line, embeddings excluded). Use for backup before risky operations, or to move memories between machines.
| Parameter | Type | Description |
|---|---|---|
memory_type | string | Export only this type. One of: ['episodic', 'feedback', 'project', 'reference', 'semantic', 'user']. Omit for all. |
namespace | string | Namespace to export. Defaults to '*' (every namespace) — exports are backups. |
path | string | Output file path. Defaults to exports/memories-<timestamp>.jsonl in the data dir. |
find_duplicate_memories
Report near-duplicate memory pairs by embedding similarity. Report-only: nothing is deleted. Review the pairs, then remove specific losers with delete_memory after confirming with the user — prefer deleting the lower-salience or older duplicate.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max pairs to return (default 50) |
namespace | string | Namespace to scan. Omit for this server's namespace. |
threshold | number | Minimum cosine similarity to flag a pair (default 0.92) |
log_assessment
Log a forward-looking assessment to the judgment ledger. Use this whenever making a prediction, recommendation, or forward-looking call. Prefer a numeric 'probability' (0-1) — it enables real calibration (Brier score) over time. Assessments are tracked and later scored against what actually happened.
| Parameter | Type | Description |
|---|---|---|
domain * | string | Assessment domain (one of the configured LEDGER_DOMAINS) |
text * | string | The assessment or prediction, stated clearly |
conditions | string | Relevant conditions or context at time of assessment |
confidence | string | Categorical confidence, used only if 'probability' is omitted (high=0.9, moderate=0.75, low=0.6) |
horizon | string | Expected resolution timeframe e.g. '2 weeks', '3 months' |
logic | string | The reasoning behind this assessment at the time |
probability | number | Forecast probability the call proves right, 0-1 (e.g. 0.7). Preferred over 'confidence'; enables Brier scoring. |
source_session | string | Brief label for where this came from e.g. 'planning session 2025-01-15' |
list_pending_assessments
List unresolved assessments from the judgment ledger. Use during weekly review to surface what needs scoring, or at session start to remind of open calls in a domain.
| Parameter | Type | Description |
|---|---|---|
domain | string | Filter by domain. Omit for all domains. |
limit | integer | Max results (default 50) |
resolve_assessment
Mark an assessment as resolved with its actual outcome and score. score: 1 = right, 0 = partially right, -1 = wrong. Call this as soon as the outcome of a prediction is known.
| Parameter | Type | Description |
|---|---|---|
id * | string | Assessment ID from log_assessment |
outcome * | string | What actually happened |
score * | integer | 1 = right, 0 = partial, -1 = wrong |
generate_calibration
Extract calibration patterns from resolved assessments in a domain and write a high-salience feedback memory. Run this after a batch of resolutions in a domain. Requires at least 3 resolved assessments in the domain.
| Parameter | Type | Description |
|---|---|---|
domain * | string | Domain to generate calibration for |
get_bias_map
Generate a structured bias report across all resolved assessments. Shows where judgment is well-calibrated vs. systematically off. Use for quarterly self-calibration review.
| Parameter | Type | Description |
|---|---|---|
domain | string | Filter to one domain. Omit for full cross-domain map. |