# MCP Tool Inventory

This document provides a comprehensive inventory of all 121 MCP tools available in the M3 Memory system.

> **How this reconciles with other docs.** The **110** in-catalog tools (the number the README/COMPARISON quote as "100+", and the `count` in `docs/tools/MCP_CATALOG.json`, which excludes the two `tools_*` meta-tools → **108** there) plus **11** MCP-proxy protocol/debug tools (`mcp_proxy.py`) = **121** total listed here. The prose "100+ tools" refers to the in-catalog surface; this inventory additionally documents the proxy transport tools.

## Summary Table

| Name | Category | Description |
| --- | --- | --- |
| `memory_delete` | Memory Operations | Deletes a MemoryItem (soft or hard). id MUST be the full UUID — a prefix is rejected (full UUID required for mutation safety; memory_get accepts a prefix, this does not). |
| `memory_delete_bulk` | Memory Operations | Deletes a list of MemoryItems (soft or hard) in one transaction per chunk. Use for curation/dedup passes deleting many items; falls back to per-id memory_delete behavior with the same hard-cascade semantics. Returns a structured {succeeded, not_found, mode} dict. |
| `memory_feedback` | Memory Operations | Provide feedback on a memory item to improve quality. |
| `memory_get` | Memory Operations | Retrieves a full MemoryItem; accepts full UUID or 8-char prefix; ambiguous prefixes return an error. |
| `memory_pin` | Memory Operations | Pin a memory to exempt it from decay, expiry, and retention purges. Pinned memories are never auto-archived, never importance/confidence-decayed, and never expiry- or TTL-purged by memory_maintenance — use for facts that must survive indefinitely regardless of access recency. |
| `memory_search` | Memory Operations | Search across memory items using semantic similarity or keyword matching. Filter by user_id and scope for isolation. |
| `memory_search_multi_db` | Memory Operations | Search across multiple SQLite databases (e.g. agent_memory.db AND agent_chatlog.db) in one call. Each DB is searched independently via hybrid FTS5+vector search and the top results are merged by score. Returns the global top-K with each item tagged with its source database. Caveat: FTS5 BM25 scores depend on per-DB corpus stats so cross-DB ranks are approximate; works well for small fan-out (typically 2-5 DBs sharing the same embed_model). |
| `memory_search_routed` | Memory Operations | Temporal-aware routed retrieval. Routes temporal queries to verbatim search at k+temporal_k_bump; non-temporal queries to (optionally fact-fused) max-kind search at k. Pass fact_variant for two-tier fact-fusion. Optional graph_depth and expand_sessions add post-retrieval neighbor expansion. |
| `memory_search_scored` | Memory Operations | Structured hybrid FTS5+vector+MMR search. Returns ranked rows [(score, item)] with content + metadata (id, valid_from, conversation_id, user_id) — NOT formatted text. Use when a caller needs parseable rows rather than an LLM-readable block (e.g. a memory-provider backend). Empty query + type_filter = filter-only listing. Same bench-data gate as memory_search. |
| `memory_suggest` | Memory Operations | Preview which memories would be retrieved for a query, with score breakdowns explaining why each was selected. |
| `memory_unpin` | Memory Operations | Unpin a memory, restoring normal decay/expiry/retention handling. |
| `memory_update` | Memory Operations | Updates a MemoryItem by ID. |
| `memory_verify` | Memory Operations | Verify content integrity by comparing stored hash with computed hash. Returns OK if content hasn't been tampered with. |
| `memory_write` | Memory Operations | Creates a MemoryItem and optionally embeds it for semantic search. Contradiction detection is automatic — if new content conflicts with an existing memory of the same type/title, the old one is superseded. Use type='auto' to let the LLM decide the best category. |
| `memory_write_from_file` | Memory Operations | Write a memory whose content is read from a file on disk. Use this when the memory body is large (>1k chars) to avoid the autoregressive decode latency of streaming a multi-thousand-token JSON `input` field through tool_use — write the body with the Write tool first (off the streaming path, fast), then call this tool with just the path + tiny metadata. The MCP server reads the file, writes the row through the same path as memory_write (all gates apply), and by default deletes the source file on success. Path must be absolute on the host running this MCP server. Files >200000 bytes are rejected; underlying content is still capped at 50000 chars by memory_write_impl. |
| `enrich_pending` | Knowledge Graph | Enrich pending memory items with SLM-distilled facts. Default dry_run=true reports count + ETA; pass dry_run=false to execute. |
| `entity_get` | Knowledge Graph | Load a single entity with its full neighborhood: predecessors, successors, and linked memory items. |
| `entity_search` | Knowledge Graph | Search entities by canonical_name and optionally by entity_type. Returns list of matching entities with optional neighbor counts. |
| `extract_pending` | Knowledge Graph | Extract pending entities from the queue. Default dry_run=true reports count + ETA; pass dry_run=false to execute. |
| `memory_graph` | Knowledge Graph | Returns the local graph neighborhood of a memory item (connected memories up to N hops, max 3). |
| `memory_history` | Knowledge Graph | Returns the change history (audit trail) for a memory item. Tracks create, update, delete, and supersede events. |
| `memory_link` | Knowledge Graph | Creates a directional link between two memory items. Valid types: related, supports, contradicts, extends, supersedes, references, consolidates, message, handoff. |
| `conversation_append` | Conversations | Appends a message to a conversation. |
| `conversation_search` | Conversations | Search messages across conversations using hybrid semantic/keyword search. |
| `conversation_start` | Conversations | Starts a new conversation thread. |
| `conversation_summarize` | Conversations | Summarize a conversation into key points using the local LLM. |
| `task_assign` | Task Management | Assign a task to an owner. Sets state=in_progress and notifies the new owner. |
| `task_create` | Task Management | Create a new task in 'pending' state. Returns task id. |
| `task_delete` | Task Management | Delete a task. Soft-delete (default) sets a tombstone that propagates via pg_sync to the warehouse and peers. Hard-delete removes the row locally and requires a prior soft-delete. |
| `task_get` | Task Management | Get full record for one task. |
| `task_list` | Task Management | List tasks with optional filters. Newest updated first. |
| `task_set_result` | Task Management | Set the result memory pointer for a task. Does NOT change state. |
| `task_tree` | Task Management | Render a recursive subtree of tasks rooted at root_task_id. |
| `task_update` | Task Management | Partial update for a task. Validates state transitions. On terminal state, sets completed_at. |
| `agent_get` | Agent Registry & Notifications | Get full record for one registered agent. |
| `agent_heartbeat` | Agent Registry & Notifications | Update last_seen and set status=active. Errors if not registered. |
| `agent_list` | Agent Registry & Notifications | List registered agents, optionally filtered by status and/or role. |
| `agent_offline` | Agent Registry & Notifications | Mark an agent as offline. |
| `agent_register` | Agent Registry & Notifications | Register an agent (UPSERT). Sets status=active, last_seen=now. |
| `agent_set_trust` | Agent Registry & Notifications | Set an agent's trust score (0.5-1.0, clamped). Trust weights that agent's assertions in memory confidence aggregation; 1.0 is neutral. Upserts the agent if absent. |
| `notifications_ack` | Agent Registry & Notifications | Mark one notification as read. |
| `notifications_ack_all` | Agent Registry & Notifications | Bulk-ack all unread notifications for an agent. Returns count acked. |
| `notifications_poll` | Agent Registry & Notifications | List notifications addressed to agent_id, newest first. |
| `notify` | Agent Registry & Notifications | Send a notification to an agent. Lightweight wake signal — agents poll notifications_poll. |
| `memory_handoff` | Multi-Agent Coordination | Hand off a task from one agent to another. Writes a new handoff-type memory owned by to_agent and links it to the given context memories with 'handoff' edges. Returns a confirmation string with the new memory id. |
| `memory_inbox` | Multi-Agent Coordination | List handoff messages addressed to agent_id, newest first. Pass unread_only=False to include already-acked items. |
| `memory_inbox_ack` | Multi-Agent Coordination | Mark a handoff memory as read (sets read_at = now). |
| `memory_refresh_queue` | Multi-Agent Coordination | List memories whose refresh_on timestamp has arrived and need review. Read-only — to actually refresh a memory, call memory_update with new content/refresh_on. Pass include_future=True to see all memories with refresh_on set, not just overdue ones. |
| `chatlog_cost_report` | Chat Log System | Aggregate tokens and cost_usd across chat_log rows. Groups: provider|model_id|host_agent|conversation_id|day. |
| `chatlog_list_conversations` | Chat Log System | List distinct conversation_ids with turn counts and timespans. |
| `chatlog_promote` | Chat Log System | Promote chat_log rows into the main memory DB under a new type (default 'conversation'). ATTACH + INSERT SELECT in separate/hybrid; UPDATE type in integrated. |
| `chatlog_rescrub` | Chat Log System | Re-apply redaction to existing chat_log rows. Requires redaction.enabled=true. |
| `chatlog_search` | Chat Log System | Search chat_log rows. FTS5 keyword when query is non-empty; filter-only when empty. |
| `chatlog_set_redaction` | Chat Log System | Flip redaction on/off and update patterns. Persists to memory/.chatlog_config.json. |
| `chatlog_status` | Chat Log System | One-call health summary of the chat log subsystem: mode, DB paths, row counts, queue depth, spill files, embed backlog, hook timestamps, redaction state, warnings. |
| `chatlog_write` | Chat Log System | Append one chat turn to the chat log DB. Provenance (host_agent, provider, model_id, conversation_id) is required. Writes are async-queued — returns the row id immediately. |
| `chatlog_write_bulk` | Chat Log System | Bulk-append N chat turns. Each item needs the same required fields as chatlog_write. |
| `check_thermal_load` | Operational Protocol | Protocol #2 - Check M3 Max thermal/RAM pressure. Returns Nominal|Fair|Serious|Critical. |
| `log_activity` | Operational Protocol | Archive activity to the agent log (Protocols #1-#3). category=thought for complex reasoning, hardware after thermal check, decision when user agrees to any code change, file move, or direction. |
| `query_decisions` | Operational Protocol | Protocol #4 - MUST call before starting any new task. Full-text search across project_decisions table for prior decisions. |
| `retire_focus` | Operational Protocol | Protocol #5 - Clear dashboard focus when a task completes. |
| `update_focus` | Operational Protocol | Protocol #5 - Call every 3 turns with a <=10-word trajectory summary. |
| `debug_analyze` | Debug Agent | Root cause analysis with memory-augmented reasoning. Searches past issues, reads source, uses local LLM to diagnose. |
| `debug_bisect` | Debug Agent | Automated git bisect with LLM analysis of the offending commit. |
| `debug_correlate` | Debug Agent | Cross-reference logs, git commits, and decisions to build a causal timeline. |
| `debug_history` | Debug Agent | Search past debugging sessions and patterns. No LLM required. |
| `debug_report` | Debug Agent | Generate and persist a structured debugging report to memory. |
| `debug_trace` | Debug Agent | Execution flow analysis - reads source, finds callers, identifies failure points. |
| `memory_consolidate` | Lifecycle & Maintenance | Consolidate old memories of the same type into summaries using the local LLM. Reduces clutter while preserving knowledge. |
| `memory_dedup` | Lifecycle & Maintenance | Find (and optionally soft-delete) near-duplicate memory items by cosine similarity over embeddings. Returns {count, groups: [{a, b, title_a, title_b, score}, ...], threshold, scanned, applied}. Use dry_run=True (default) for a preview; dry_run=False soft-deletes the second item of each pair. |
| `memory_maintenance` | Lifecycle & Maintenance | Runs maintenance tasks on the memory store. |
| `memory_set_retention` | Lifecycle & Maintenance | Set or update per-agent memory retention policy. Controls max memory count, TTL expiry, and auto-archival. |
| `gdpr_export` | Data Governance | Export all memories for a data subject (GDPR data portability). Returns JSON with all memory items for the given user_id. |
| `gdpr_forget` | Data Governance | Right to be forgotten — hard-deletes ALL data for a user_id including memories, embeddings, relationships, and history. |
| `memory_export` | Data Governance | Export memories as portable JSON. Filter by agent, type, or date. |
| `memory_import` | Data Governance | Import memories from a JSON export. UPSERT semantics — safe to re-run. |
| `embedder_status` | Infrastructure Operations | Check the status of the local sovereign embedder server (default port 8082, override via M3_EMBED_FALLBACK_URL). |
| `memory_cost_report` | Infrastructure Operations | Returns current session operation counts and estimated token usage for memory operations. |
| `curate_chatlog_apply` | Uncategorized | Deterministically apply a chatlog.db curator plan in ONE call. No LLM in the loop. Plan sections: decay (True/dict to run chatlog_decay), dedup (list of {keep_id, drop_ids}), promote (list of {ids, target_type}), prune (list of {conversation_id, reason}). Any section may be omitted. Returns structured per-section results + summary. |
| `curate_memory_apply` | Uncategorized | Deterministically apply a memory.db curator plan in ONE call. No LLM in the loop — the apply phase is a pure function over the structured plan. Replaces the agent-driven APPLY-mode loop. Plan sections: delete (soft, list of UUIDs), delete_hard (cascade, list of UUIDs), link (list of {from_id, to_id, relationship_type}), update (list of {id, importance, metadata, ...}). Any section may be omitted. Returns structured per-section results + summary. |
| `entity_mentions` | Uncategorized | List memory_ids that mention a specific entity in a single conversation. Pass either entity_id (preferred — exact match) or canonical_name (case-insensitive, optionally disambiguated by entity_type). Returns {entity_id, canonical_name, entity_type, total, memory_ids: [...]}. Caller fetches text via existing read paths (which carry their own authz). Companion to entity_search and entity_get; lives in the 'entity' domain. |
| `extract_entities` | Uncategorized | Accepts raw text, extracts entities and relationship predicates based on the configured pluggable entity-extraction backend, and returns them as structured JSON without modifying the database. Use this to preview what entities and relationships would be extracted from raw content. |
| `files_corpus_create` | Uncategorized | Register a new corpus with optional default overrides. `default=True` marks this corpus as the installation's default (clears the flag on any prior default in the same transaction). |
| `files_corpus_delete` | Uncategorized | Delete a corpus's settings row. Cascade=True also deletes every file_node in the corpus -- DESTRUCTIVE. Without cascade, refuses when the corpus has file_nodes. |
| `files_corpus_get` | Uncategorized | Fetch a single corpus's settings + counts. |
| `files_corpus_list` | Uncategorized | Enumerate corpora with row counts. |
| `files_corpus_set` | Uncategorized | Update settings for an existing corpus. None args are no-ops. Creates the corpus_settings row if absent. |
| `files_dedup` | Uncategorized | Scan leaf embeddings for near-duplicates above cosine threshold. Detection only -- pairs land in semantic_dedup_candidates for human review. |
| `files_dedup_list` | Uncategorized | List near-duplicate candidate pairs with text snippets and paths. |
| `files_dedup_review` | Uncategorized | Record a review decision on a near-duplicate candidate: 'kept' | 'merged' | 'ignored'. |
| `files_entity_coalesce` | Uncategorized | Detect provisional-entity coalescing candidates (quarantine noise + flag near-duplicate entities). Detection only -- never merges, never auto-applies; candidates land in entity_coalesce_candidates for review. dry_run=True estimates without writing or embedding. |
| `files_entity_coalesce_apply` | Uncategorized | Apply the reversible same_as/cluster overlay. Union of explicit candidate_uuids (reviewed 'merge' or 'unapplied' tombstone) and -- if include_auto_merge -- the LATEST run's 'merge' band (or resolution_run). Members are never deleted; reverse with files_entity_coalesce_unapply. WRITES the core graph: a real apply MUST pass confirm=True; dry_run=True previews without writing. |
| `files_entity_coalesce_list` | Uncategorized | List entity-coalescing candidate pairs (name + score + band). |
| `files_entity_coalesce_review` | Uncategorized | Record entity-coalescing review decisions in BULK: a list of {uuid, action} where action is 'merge' | 'related' | 'reject' | 'defer'. Records intent only; materialize with files_entity_coalesce_apply. |
| `files_entity_coalesce_unapply` | Uncategorized | Reverse one coalescence cluster (drop edges, clear flags, strip aliases, tombstone the candidate so auto-merge won't resurrect it). Members are never deleted; re-apply via files_entity_coalesce_apply with candidate_uuids. |
| `files_extract_pending` | Uncategorized | Drain leaves with extraction_status='pending' through the LLM fact extractor. Used after a queue-mode ingest. Safe to call repeatedly. |
| `files_get` | Uncategorized | Fetch one record by UUID. Tries file_nodes then leaves. |
| `files_health` | Uncategorized | DB integrity + FTS5 sync check. Set rebuild=True to fix drift. |
| `files_index` | Uncategorized | Return file-level summaries for triage (wiki-index primitive). Cheap-first retrieval -- no leaf content. Use BEFORE files_search to decide which files are worth deep-reading. |
| `files_ingest` | Uncategorized | Walk a directory and ingest supported files into files.db. Idempotent: same content_sha256 -> no-op; changed content -> new file_node version supersedes prior. Use extract_mode to opt into fact extraction; use original_path (or a <path>.m3meta.json sidecar) to point search results at a source-of-truth file when the ingested file is a conversion. |
| `files_link_rename` | Uncategorized | Re-point an existing file_node at a new path (rename / move). NOT a supersession -- content stays identical. Use this only when staleness review surfaces a rename candidate. |
| `files_promotable` | Uncategorized | List top promotion candidates by usage-weighted heuristic score. Suggestion-only; use files_promote to actually ascend any. |
| `files_promote` | Uncategorized | Promote (ascend) a fact / leaf / file_summary from files.db to memory.db. Source stays untouched; copy lands in memory.db with a metadata back-pointer. Idempotent. |
| `files_promotion_list` | Uncategorized | List existing promotions. source_superseded=True surfaces promotions whose source file has since been superseded -- candidates for review. |
| `files_search` | Uncategorized | Hybrid FTS5 + vector search over file-ingestion leaves. Default: current versions only. Set include_history=True for time-travel queries. Use `corpora` for fan-out across multiple corpora. |
| `files_staleness_review` | Uncategorized | Compare filesystem against files.db. Surfaces stale, touched-only, missing, new, failed-extraction, drifted-promotion files, and rename candidates. Report-only. |
| `files_stats` | Uncategorized | Corpus-level counters: file_nodes, leaves, embed coverage, by-filetype. |
| `files_watch_once` | Uncategorized | Single-pass staleness check + notification dispatch. Suitable for cron / scheduled runners. Notifications are emitted via the memory.db notifications inbox; cooldown suppresses duplicates within the window. |
| `m3_call` | Uncategorized | Invoke ANY m3 catalog tool by name without loading its domain — the low-token path to the full tool surface. Single call: pass `tool` (e.g. 'files_stats') and `args` (an object). Batch: pass `batch`, a list of {tool, args} (each isolated — one failure won't abort the rest; capped at 100). Set `dry_run` to validate args + check the destructive gate WITHOUT executing. Returns JSON. Call `m3_index` first if you don't know a tool's args. Destructive tools require MCP_PROXY_ALLOW_DESTRUCTIVE=1. |
| `m3_help_capabilities` | Uncategorized | Discover m3-memory tool capabilities, parameters, and availability. Allows filtering by a logical domain (memory, chatlog, files, entity, agent, tasks, conversations, admin, diagnostics) or searching by keywords. |
| `m3_index` | Uncategorized | List m3 catalog tools (optionally one domain) as structured rows: name, domain, one-line summary, destructive flag, and arg specs (name/type/required). Use this to discover the exact args for any tool before calling it via m3_call — cheaper than a failed call. Read-only catalog metadata; never returns tool output. Domains: memory, chatlog, files, entity, agent, tasks, conversations, diagnostics, admin. |
| `memory_count_entities` | Uncategorized | Count distinct entities mentioned in a single conversation. Direct-index aggregation — no LLM, no embedding. Use this for 'how many distinct X did I mention' inventory questions where top-k embedding retrieval would miss instances spread thinly across many turns. Returns {count, conversation_id, entity_type, pattern}. |
| `memory_count_mentions` | Uncategorized | Per-entity mention frequency within a single conversation, sorted DESC by count. Use for 'what are the most-mentioned X' or 'rank entities by frequency.' Returns {total, rows: [{entity_id, canonical_name, entity_type, mention_count}, ...]}. |
| `memory_doctor` | Uncategorized | Self-service diagnostic for the m3-memory embedding cascade. Probes tier-1 (in-proc GGUF), tier-2 (m3-embed-server :8082), DB integrity, and end-to-end embed roundtrip — all concurrently with bounded 2s per-probe timeouts. Returns a structured dict with status ('healthy' | 'degraded' | 'broken'), per-tier details, issues, and actionable recommendations. Use this when memory_search hangs, embeddings look wrong, or you're standing up a new deployment. |
| `memory_doctor_fix` | Uncategorized | Run the m3-memory self-repair mode (m3 doctor --fix). Attempts to auto-fix the most common deployment issues in order: (1) apply pending SQLite migrations, (2) rebuild the FTS5 full-text index, (3) embed-backfill items that are missing vector embeddings (capped at 500/run), (4) rebuild the m3_system_cohesion table if absent. Set dry_run=True to see what *would* be done without making any changes. Returns a structured dict with per-action outcomes and a summary status ('ok' | 'partial' | 'nothing_to_do' | 'failed'). |
| `memory_lifecycle_summary` | Uncategorized | Windowed summary of lifecycle & contradiction activity over the last `window_days` days: counts of create/update/delete/supersede events, corroboration vs contradiction events, and the most-revised / most-contradicted memories. Read-only aggregate over memory_history (mig 009) + memory_corroborations (mig 036). Answers 'what did the memory system do to itself?' and 'we updated this belief N times'. Degrades gracefully on pre-036 DBs (contradiction counts = 0). |
| `memory_link_bulk` | Uncategorized | Create many memory_relationships rows in one transaction per chunk. Use for curation passes adding many LINK edges (device pairs, supersession chains, etc.). Validates existence of every referenced memory_id; skips duplicates without raising. Returns a structured {created, skipped_missing, skipped_duplicate, total} dict. |
| `memory_supersede` | Uncategorized | Explicitly supersede an existing memory with a new one. Use this to record an intentional update — 'this fact replaces that specific memory' — when you know the old memory's id. Unlike memory_write's automatic contradiction detection (a cosine + title heuristic that may link the wrong prior memory or none at all), this targets the given old_id deterministically. Non-destructive: the old memory is retained, its validity interval is closed (is_deleted=1, valid_to set), and a 'supersedes' edge is recorded new -> old. The old memory stays retrievable by id and via memory_history, and as_of-filtered search still sees it valid before the supersession point — it is only dropped from default search. Fields you omit (type, title, importance, scope) are inherited from the old memory, so pass only what changed. To hard-delete instead, that is a separate gated tool (memory_delete). old_id MUST be the full UUID — a prefix is rejected (full UUID required for mutation safety; memory_get accepts a prefix, this does not). Note: each supersede creates a NEW successor memory; call it once with the full id, do not chain supersedes. |
| `memory_update_bulk` | Uncategorized | Apply many metadata-only updates in one transaction per chunk. Designed for curation passes that retroactively set retention, importance, or supersession metadata. Per-id reembed is NOT supported here (use memory_update for reembed, or re_embed_all for the bulk reembed case). Returns structured {succeeded, not_found, no_change, total}. |
| `tools_list_domains` | Uncategorized | List m3 tool domains (memory, chatlog, files, entity, agent, tasks, conversations, diagnostics, admin) and their tool counts. Call `tools_load_domain` to expose a domain's full tool surface. |
| `tools_load_domain` | Uncategorized | Register a tool domain's full surface for the current MCP session. Use when you need tools beyond the essentials (memory_search, memory_write, memory_get, chatlog_search, chatlog_write, files_search). Valid domains: memory, chatlog, files, entity, agent, tasks, conversations, diagnostics, admin. |

---

## Memory Operations

### `memory_delete`

Deletes a MemoryItem (soft or hard). id MUST be the full UUID — a prefix is rejected (full UUID required for mutation safety; memory_get accepts a prefix, this does not).

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `id` | `string` | Yes | FULL UUID of the memory (not an 8-char prefix — a prefix is rejected for mutation safety). | `-` |
| `hard` | `boolean` | No | Hard delete (permanent). | `False` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_delete_bulk`

Deletes a list of MemoryItems (soft or hard) in one transaction per chunk. Use for curation/dedup passes deleting many items; falls back to per-id memory_delete behavior with the same hard-cascade semantics. Returns a structured {succeeded, not_found, mode} dict.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `ids` | `array` | Yes | List of memory item UUIDs to delete. | `-` |
| `hard` | `boolean` | No | Hard delete (permanent). | `False` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_feedback`

Provide feedback on a memory item to improve quality.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `memory_id` | `string` | Yes | Memory item UUID. | `-` |
| `feedback` | `string` | No | Feedback type. | `useful` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_get`

Retrieves a full MemoryItem; accepts full UUID or 8-char prefix; ambiguous prefixes return an error.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `id` | `string` | Yes | Memory item id — 36-char UUID or 8-char prefix. Ambiguous prefixes return an error listing the matching ids. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_pin`

Pin a memory to exempt it from decay, expiry, and retention purges. Pinned memories are never auto-archived, never importance/confidence-decayed, and never expiry- or TTL-purged by memory_maintenance — use for facts that must survive indefinitely regardless of access recency.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `id` | `string` | Yes | Memory item id — 36-char UUID or 8-char prefix. Ambiguous prefixes return an error listing the matching ids. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_search`

Search across memory items using semantic similarity or keyword matching. Filter by user_id and scope for isolation.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `query` | `string` | Yes | Search query. | `-` |
| `k` | `integer` | No | Max results (1-100). | `8` |
| `type_filter` | `string` | No | Restrict to a memory type. | `` |
| `agent_filter` | `string` | No | Restrict to an agent id. | `` |
| `search_mode` | `string` | No | Retrieval mode. | `hybrid` |
| `include_scratchpad` | `boolean` | No | Include ephemeral scratchpad items. | `False` |
| `user_id` | `string` | No | Filter by data subject. | `` |
| `scope` | `string` | No | Filter by isolation scope. | `` |
| `requesting_agent` | `string` | No | Calling agent's id. When set, ENFORCES cross-agent isolation: private (scope='agent') rows from OTHER agents are excluded; the caller still sees its own private rows plus all shared scopes (org/user/session). Empty = no enforcement (sees all, back-compat). | `` |
| `as_of` | `string` | No | ISO-8601 time-travel cutoff. | `` |
| `conversation_id` | `string` | No | Restrict to a conversation / team session. | `` |
| `recency_bias` | `number` | No | Boost newer items (0.0=off, 0.1-0.2=moderate, higher=aggressive). Useful for 'current' or 'latest' queries. | `0.0` |
| `adaptive_k` | `boolean` | No | Auto-trim results at the score drop-off point. WARNING: regresses on temporal-reasoning, knowledge-update, and multi-session queries; safe only for sharp-curve queries where most retrievals would be noise. Prefer `auto_route=True` on memory_search_routed for safer multi-signal routing. | `False` |
| `variant` | `string` | No | Ingest-pipeline filter. '' = real user data only (default, equivalent to IS NULL). Pass a specific variant name (e.g. 'heuristic_c1c4') to scope to that bench ingest. | `` |
| `include_bench_data` | `boolean` | No | Opt in to LOCOMO / LongMemEval bench rows. Default False hides any row with a variant tag. | `False` |
| `explain` | `boolean` | No | Attach a per-result `_explanation` block (vector/bm25/title_overlap/importance/recency/temporal score breakdown) plus a human-readable `reason` string explaining why each row matched. Same breakdown memory_suggest shows, on the primary search path. | `False` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_search_multi_db`

Search across multiple SQLite databases (e.g. agent_memory.db AND agent_chatlog.db) in one call. Each DB is searched independently via hybrid FTS5+vector search and the top results are merged by score. Returns the global top-K with each item tagged with its source database. Caveat: FTS5 BM25 scores depend on per-DB corpus stats so cross-DB ranks are approximate; works well for small fan-out (typically 2-5 DBs sharing the same embed_model).

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `query` | `string` | Yes | Search query. | `-` |
| `databases` | `string` | Yes | Comma-separated list of DB paths to fan out to (e.g. 'memory/agent_memory.db,memory/agent_chatlog.db'). Empty = no-op. | `-` |
| `k` | `integer` | No | Top-K to return globally after merge. Each per-DB search also retrieves K, then results are pooled and re-sorted. | `8` |
| `type_filter` | `string` | No |  | `` |
| `agent_filter` | `string` | No |  | `` |
| `search_mode` | `string` | No |  | `hybrid` |
| `user_id` | `string` | No |  | `` |
| `scope` | `string` | No |  | `` |
| `requesting_agent` | `string` | No | Calling agent's id. When set, ENFORCES cross-agent isolation: other agents' private (scope='agent') rows are excluded; caller sees its own private + shared scopes. Empty = no enforcement. | `` |
| `as_of` | `string` | No |  | `` |
| `conversation_id` | `string` | No |  | `` |
| `recency_bias` | `number` | No |  | `0.0` |
| `adaptive_k` | `boolean` | No |  | `False` |
| `variant` | `string` | No | Variant filter applied uniformly to each DB. Pass a comma-separated list to use multi-variant IN filtering (passed through to memory_search_scored_impl). | `` |
| `fan_out_limit` | `integer` | No | Cap on concurrent per-DB searches. 0 = unbounded (typical, since fan-out N is small). | `0` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_search_routed`

Temporal-aware routed retrieval. Routes temporal queries to verbatim search at k+temporal_k_bump; non-temporal queries to (optionally fact-fused) max-kind search at k. Pass fact_variant for two-tier fact-fusion. Optional graph_depth and expand_sessions add post-retrieval neighbor expansion.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `query` | `string` | Yes | Search query. | `-` |
| `k` | `integer` | No | Top-K to return. | `10` |
| `fact_variant` | `string` | No | Optional fact-tier variant to fuse with base. Empty = single-variant. | `` |
| `temporal_k_bump` | `integer` | No | Extra slots added when query is temporal. | `5` |
| `graph_depth` | `integer` | No | If > 0, traverse memory_relationships up to N hops from each top-K hit and re-fuse. Clamped to 3. | `0` |
| `expand_sessions` | `boolean` | No | If true, pull all turns sharing each top-K hit's conversation_id (capped at session_cap) and re-fuse. | `False` |
| `session_cap` | `integer` | No | Per-session turn cap when expand_sessions=true. | `12` |
| `user_id` | `string` | No |  | `` |
| `scope` | `string` | No |  | `` |
| `requesting_agent` | `string` | No | Calling agent's id. When set, ENFORCES cross-agent isolation: other agents' private (scope='agent') rows are excluded; caller sees its own private + shared scopes. Empty = no enforcement. | `` |
| `type_filter` | `string` | No |  | `` |
| `agent_filter` | `string` | No |  | `` |
| `search_mode` | `string` | No |  | `hybrid` |
| `variant` | `string` | No |  | `` |
| `as_of` | `string` | No |  | `` |
| `conversation_id` | `string` | No |  | `` |
| `explain` | `boolean` | No |  | `False` |
| `entity_graph` | `boolean` | No | Direct lever for entity-graph expansion. Default False = OFF (production default; matches memory_search behavior). True = parse query for named entities, traverse entity_relationships up to entity_graph_depth hops, fold matched memory_ids into the result set tagged expanded_via='entity_graph'. The AUTO layer can also flip this on for the entity_anchored branch (see auto_entity_graph_enabled), but caller-explicit entity_graph=True works without auto_route. Use for benchmarking + production opt-in once empirically validated. | `False` |
| `rerank` | `boolean` | No | Cross-encoder reranking. Default False = OFF (production behavior unchanged). True = re-score top (rerank_pool_k or 3*k) hits with sentence-transformers CrossEncoder, blend with hybrid score per rerank_blend, re-sort. Adds ~12MB-560MB model download (cached at ~/.cache/torch) + ~50ms/pair on GPU, ~200ms/pair on CPU. Used in benchmarking; opt-in for production retrieval. | `False` |
| `rerank_model` | `string` | No | Cross-encoder model id. Default empty = DEFAULT_RERANK_MODEL (cross-encoder/ms-marco-MiniLM-L-6-v2 — small, fast, English-tuned). Higher-accuracy alternative: BAAI/bge-reranker-v2-m3 (multilingual, larger, slower). Override via M3_RERANK_MODEL env var. | `` |
| `rerank_pool_k` | `integer` | No | Pool size before rerank. Default 0 = 3*k. Higher pool = more candidates rescored = slower but potentially higher recall. Never truncates below final k. Only used when rerank=True. | `0` |
| `rerank_blend` | `number` | No | Blend factor: final_score = rerank_blend * ce_score + (1 - rerank_blend) * hybrid_score. Default 1.0 = pure CE replacement (most aggressive). 0.5 = average. 0.3 = CE as tiebreaker over hybrid. 0.0 = no-op (skip rerank — same effect as rerank=False). Only used when rerank=True. | `1.0` |
| `entity_graph_depth` | `integer` | No | BFS hop count over entity_relationships when entity_graph=True. Default 1 = direct neighbors only. Clamped to [1,3] core-side. Higher depth pulls more neighbors but adds noise; depth=2 typically helps multi-hop questions but regresses sharp single-fact lookups. | `1` |
| `entity_graph_max_neighbors` | `integer` | No | Cap on entity nodes discovered during BFS traversal when entity_graph=True. Default 20. Clamped to [1,100] core-side. Lower = fewer rows folded in but tighter relevance; higher = broader recall at cost of precision. | `20` |
| `auto_route` | `boolean` | No | Multi-signal retrieval routing. Default False = no auto-routing (existing behavior). True = router picks branch (temporal/multi_session/sharp/default) and fills in unset parameters with branch-specific values; caller-explicit values still win. | `False` |
| `auto_top1_sharp_min` | `number` | No | Top-1 score above which query is marked sharp. Default 0.89. Used by sharp branch to detect high-confidence queries. | `0.89` |
| `auto_slope_at_3_sharp_min` | `number` | No | Slope-at-3 (score drop per rank) above which query is marked sharp. Default 0.08. Steeper curves = more relevance discrimination. | `0.08` |
| `auto_conv_id_diversity_threshold` | `integer` | No | Number of distinct conversation IDs in top-10 hits above which query is routed to multi_session. Default 5. Higher threshold = only very scattered results trigger expansion. | `5` |
| `auto_top1_low_threshold` | `number` | No | Score floor for sharp detection (OOD guard). Default 0.50. Below this, query is not marked sharp even if other signals fire (prevents misclassifying low-confidence matches). | `0.5` |
| `auto_temporal_k` | `integer` | No | k for temporal branch when auto_route=True. Default 15. Branch fires when query has temporal cues (when/since/before/after/dates). | `15` |
| `auto_temporal_recency_bias` | `number` | No | recency_bias for temporal branch. Default 0.05. Boosts recent memories over older ones (useful for 'recently'/'today' questions). | `0.05` |
| `auto_temporal_expand_sessions` | `boolean` | No | expand_sessions for temporal branch. Default True. Pulls full conversation context when a temporal hit is found (important for 'what happened after X' questions). | `True` |
| `auto_temporal_graph_depth` | `integer` | No | graph_depth for temporal branch (AUTO_v2 fix). Default 1. Traverses memory relationships to find cross-temporal references (e.g., follow-up discussions on an earlier event). | `1` |
| `auto_multi_k` | `integer` | No | k for multi_session branch when auto_route=True. Default 20. Branch fires on comparison queries (how many/count/total) or when hits scatter across multiple conversations. | `20` |
| `auto_multi_expand_sessions` | `boolean` | No | expand_sessions for multi_session branch. Default True. Pulls all turns from detected conversation IDs for aggregate comparisons ('list all X across conversations'). | `True` |
| `auto_sharp_threshold_ratio` | `number` | No | Trim hits below (top_score * ratio) in sharp branch. Default 0.85. Removes tail noise when there's a clear high-confidence cluster. | `0.85` |
| `auto_sharp_k_min` | `integer` | No | Floor for hit count after sharp threshold trim. Default 3. Ensures at least this many hits even if threshold trim is aggressive. | `3` |
| `auto_sharp_k_max` | `integer` | No | Ceiling for hit count after sharp threshold trim. Default 10. Caps result set when sharp curve is very steep. | `10` |
| `auto_entity_graph_enabled` | `boolean` | No | AUTO entity-anchored branch enable. Default True = branch fires when query has named entities AND auto_route=True. Caller can pass False to disable AUTO from enabling entity_graph (still works if caller passes entity_graph=True explicitly). | `True` |
| `auto_entity_graph_depth` | `integer` | No | Entity-graph traversal depth when AUTO entity_anchored branch fires. Default 1 = single-hop neighbors. Higher (2-3) traverses further but adds noise. | `1` |
| `auto_entity_graph_max_neighbors` | `integer` | No | Cap on entities expanded during AUTO entity-anchored traversal. Default 20. | `20` |
| `auto_entity_graph_named_entity_threshold` | `integer` | No | Minimum named-entity count in query for AUTO entity_anchored branch to fire. Default 1 = fire on any proper noun phrase (two+ capitalized words). Higher (2-3) is more conservative. | `1` |
| `entity_graph_valid_types` | `array` | No | Override list of allowed entity_type values for graph traversal. Default empty = use core defaults (person, place, organization, event, concept, object, date). Pass a list to filter traversal to specific types. | `[]` |
| `entity_graph_valid_predicates` | `array` | No | Override list of allowed predicate values for graph traversal. Default empty = use core defaults (works_at, located_in, before, after, same_as, contradicts, mentions, relates_to). Pass a list to filter traversal to specific predicates. | `[]` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_search_scored`

Structured hybrid FTS5+vector+MMR search. Returns ranked rows [(score, item)] with content + metadata (id, valid_from, conversation_id, user_id) — NOT formatted text. Use when a caller needs parseable rows rather than an LLM-readable block (e.g. a memory-provider backend). Empty query + type_filter = filter-only listing. Same bench-data gate as memory_search.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `query` | `string` | No | Search text. Empty string = filter-only (type/scope) listing. | `` |
| `k` | `integer` | No | Max rows (1-100). | `8` |
| `type_filter` | `string` | No | Restrict to a memory type (e.g. 'user_fact'). | `` |
| `agent_filter` | `string` | No | Restrict to an agent id. | `` |
| `search_mode` | `string` | No | Retrieval mode. | `hybrid` |
| `user_id` | `string` | No | Filter by data subject. | `` |
| `scope` | `string` | No | Filter by isolation scope. | `` |
| `requesting_agent` | `string` | No | Calling agent's id. When set, ENFORCES cross-agent isolation: private (scope='agent') rows from OTHER agents are excluded; the caller still sees its own private rows plus all shared scopes (org/user/session). Empty = no enforcement (sees all, back-compat). | `` |
| `as_of` | `string` | No | ISO-8601 time-travel cutoff (bitemporal point-in-time query). | `` |
| `conversation_id` | `string` | No | Restrict to a conversation / team session. | `` |
| `recency_bias` | `number` | No | Boost newer items (0.0=off). | `0.0` |
| `variant` | `string` | No | Ingest-pipeline filter. '' = real user data only. | `` |
| `include_bench_data` | `boolean` | No | Opt in to LOCOMO / LongMemEval bench rows. Default False hides any variant-tagged row. | `False` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_suggest`

Preview which memories would be retrieved for a query, with score breakdowns explaining why each was selected.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `query` | `string` | Yes | Search query. | `-` |
| `k` | `integer` | No | Max results to preview. | `5` |
| `variant` | `string` | No | Ingest-pipeline filter. Default '__none__' = real user data only. | `__none__` |
| `include_bench_data` | `boolean` | No | Opt in to bench rows. Default False. | `False` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_unpin`

Unpin a memory, restoring normal decay/expiry/retention handling.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `id` | `string` | Yes | Memory item id — 36-char UUID or 8-char prefix. Ambiguous prefixes return an error listing the matching ids. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_update`

Updates a MemoryItem by ID.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `id` | `string` | Yes | Memory item UUID. | `-` |
| `content` | `string` | No | New content (empty = no change). | `` |
| `title` | `string` | No | New title (empty = no change). | `` |
| `metadata` | `string` | No | JSON-encoded metadata (empty = no change). | `` |
| `importance` | `number` | No | New importance score (-1.0 = no change). | `-1.0` |
| `reembed` | `boolean` | No | Re-embed for semantic search. | `False` |
| `refresh_on` | `string` | No | New refresh timestamp. 'clear' removes the reminder; empty = no change. | `` |
| `refresh_reason` | `string` | No | New refresh reason. 'clear' removes; empty = no change. | `` |
| `conversation_id` | `string` | No | New conversation id. 'clear' removes; empty = no change. | `` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_verify`

Verify content integrity by comparing stored hash with computed hash. Returns OK if content hasn't been tampered with.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `id` | `string` | Yes | Memory item UUID. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_write`

Creates a MemoryItem and optionally embeds it for semantic search. Contradiction detection is automatic — if new content conflicts with an existing memory of the same type/title, the old one is superseded. Use type='auto' to let the LLM decide the best category.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `type` | `string` | Yes | Memory type. One of: auto, belief, chat_log, code, config, conversation, decision, event_extraction, fact, fact_enriched, home, home_automation, infrastructure, knowledge, linux_only, local_device, log, macos_only, message, migration-log, network_config, note, observation, plan, preference, procedure, reference, scratchpad, security, snippet, summary, synthesis, task, to_do, user_fact, windows_only. | `-` |
| `content` | `string` | Yes | Memory body (max 50000 chars). | `-` |
| `title` | `string` | No | Short title. | `` |
| `metadata` | `string` | No | JSON-encoded metadata object. | `{}` |
| `agent_id` | `string` | No | Owning agent id. Injected by the orchestrator. | `` |
| `model_id` | `string` | No | Originating model id. | `` |
| `change_agent` | `string` | No | Agent causing the write (audit). | `` |
| `importance` | `number` | No | 0.0-1.0 relevance. | `0.5` |
| `source` | `string` | No | Provenance tag. | `agent` |
| `embed` | `boolean` | No | Embed for semantic search. | `True` |
| `user_id` | `string` | No | Data subject id. | `` |
| `scope` | `string` | No | Isolation scope. | `agent` |
| `valid_from` | `string` | No | ISO-8601 validity start. | `` |
| `valid_to` | `string` | No | ISO-8601 validity end. | `` |
| `auto_classify` | `boolean` | No | Let the LLM pick the type (forced true if type='auto'). | `False` |
| `conversation_id` | `string` | No | Groups this memory with a conversation / team session. Same ID space as conversation_start. | `` |
| `refresh_on` | `string` | No | ISO-8601 timestamp when this memory should be flagged for review (lifecycle / planned obsolescence). | `` |
| `refresh_reason` | `string` | No | Why this memory needs refreshing (e.g., 'quarterly policy review'). | `` |
| `variant` | `string` | No | Pipeline identifier for A/B variant tracking. | `` |
| `embed_text` | `string` | No | Override text used for embedding; falls back to content when empty. | `` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_write_from_file`

Write a memory whose content is read from a file on disk. Use this when the memory body is large (>1k chars) to avoid the autoregressive decode latency of streaming a multi-thousand-token JSON `input` field through tool_use — write the body with the Write tool first (off the streaming path, fast), then call this tool with just the path + tiny metadata. The MCP server reads the file, writes the row through the same path as memory_write (all gates apply), and by default deletes the source file on success. Path must be absolute on the host running this MCP server. Files >200000 bytes are rejected; underlying content is still capped at 50000 chars by memory_write_impl.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `path` | `string` | Yes | Absolute path to a UTF-8 text file on the MCP server host. The file's contents become the memory `content`. | `-` |
| `type` | `string` | Yes | Memory type. One of: auto, belief, chat_log, code, config, conversation, decision, event_extraction, fact, fact_enriched, home, home_automation, infrastructure, knowledge, linux_only, local_device, log, macos_only, message, migration-log, network_config, note, observation, plan, preference, procedure, reference, scratchpad, security, snippet, summary, synthesis, task, to_do, user_fact, windows_only. | `-` |
| `title` | `string` | No | Short title. | `` |
| `metadata` | `string` | No | JSON-encoded metadata object. | `{}` |
| `agent_id` | `string` | No | Owning agent id. Injected by the orchestrator. | `` |
| `model_id` | `string` | No | Originating model id. | `` |
| `change_agent` | `string` | No | Agent causing the write (audit). | `` |
| `importance` | `number` | No | 0.0-1.0 relevance. | `0.5` |
| `source` | `string` | No | Provenance tag. | `agent` |
| `embed` | `boolean` | No | Embed for semantic search. | `True` |
| `user_id` | `string` | No | Data subject id. | `` |
| `scope` | `string` | No | Isolation scope. | `agent` |
| `valid_from` | `string` | No | ISO-8601 validity start. | `` |
| `valid_to` | `string` | No | ISO-8601 validity end. | `` |
| `auto_classify` | `boolean` | No | Let the LLM pick the type (forced true if type='auto'). | `False` |
| `conversation_id` | `string` | No | Groups this memory with a conversation / team session. | `` |
| `refresh_on` | `string` | No | ISO-8601 timestamp when this memory should be flagged for review. | `` |
| `refresh_reason` | `string` | No | Why this memory needs refreshing. | `` |
| `variant` | `string` | No | Pipeline identifier for A/B variant tracking. | `` |
| `delete_after_read` | `boolean` | No | Delete the source file after successful write. Default true (signals contents are now authoritative in m3-memory). | `True` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

## Knowledge Graph

### `enrich_pending`

Enrich pending memory items with SLM-distilled facts. Default dry_run=true reports count + ETA; pass dry_run=false to execute.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `dry_run` | `boolean` | No | If true, report count + ETA without executing; if false, execute enrichment. | `True` |
| `limit` | `integer` | No | Max items to enrich (0 = no limit). | `0` |
| `allowed_variants` | `array` | No | Variant names to include in enrichment (if empty, use default). | `[]` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `entity_get`

Load a single entity with its full neighborhood: predecessors, successors, and linked memory items.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `entity_id` | `string` | Yes | The entity ID to fetch. | `-` |
| `depth` | `integer` | No | Graph depth for neighborhood walk (currently unused; reserved for future multi-hop). | `1` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `entity_search`

Search entities by canonical_name and optionally by entity_type. Returns list of matching entities with optional neighbor counts.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `query` | `string` | No | Search term matched against canonical_name (LIKE %query%). | `` |
| `entity_type` | `string` | No | Filter by entity type (if provided). | `` |
| `limit` | `integer` | No | Max results to return. | `10` |
| `with_neighbors` | `boolean` | No | If true, compute neighbor_count for each entity. | `False` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `extract_pending`

Extract pending entities from the queue. Default dry_run=true reports count + ETA; pass dry_run=false to execute.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `dry_run` | `boolean` | No | If true, report count + ETA without executing; if false, execute extraction. | `True` |
| `limit` | `integer` | No | Max items to extract (0 = no limit). | `0` |
| `allowed_variants` | `array` | No | Variant names to include in extraction (if empty, use default). | `[]` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_graph`

Returns the local graph neighborhood of a memory item (connected memories up to N hops, max 3).

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `memory_id` | `string` | Yes | Memory item UUID. | `-` |
| `depth` | `integer` | No | Traversal depth (1-3). | `1` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_history`

Returns the change history (audit trail) for a memory item. Tracks create, update, delete, and supersede events.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `memory_id` | `string` | Yes | Memory item UUID. | `-` |
| `limit` | `integer` | No | Max history records. | `20` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_link`

Creates a directional link between two memory items. Valid types: related, supports, contradicts, extends, supersedes, references, consolidates, message, handoff.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `from_id` | `string` | Yes | Source memory UUID. | `-` |
| `to_id` | `string` | Yes | Target memory UUID. | `-` |
| `relationship_type` | `string` | No | Link type. | `related` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

## Conversations

### `conversation_append`

Appends a message to a conversation.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `conversation_id` | `string` | Yes | Conversation UUID. | `-` |
| `role` | `string` | Yes | Message role (e.g., 'user', 'assistant'). | `-` |
| `content` | `string` | Yes | Message body. | `-` |
| `agent_id` | `string` | No | Agent adding the message. | `` |
| `model_id` | `string` | No | Model that generated the message. | `` |
| `embed` | `boolean` | No | Embed for semantic search. | `True` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `conversation_search`

Search messages across conversations using hybrid semantic/keyword search.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `query` | `string` | Yes | Search query. | `-` |
| `k` | `integer` | No | Max results (1-100). | `8` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `conversation_start`

Starts a new conversation thread.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `title` | `string` | Yes | Conversation title. | `-` |
| `agent_id` | `string` | No | Owning agent id. | `` |
| `model_id` | `string` | No | Originating model id. | `` |
| `tags` | `string` | No | Comma-separated tags. | `` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `conversation_summarize`

Summarize a conversation into key points using the local LLM.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `conversation_id` | `string` | Yes | Conversation UUID. | `-` |
| `threshold` | `integer` | No | Min message count to summarize. | `20` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

## Task Management

### `task_assign`

Assign a task to an owner. Sets state=in_progress and notifies the new owner.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `task_id` | `string` | Yes | Task UUID. | `-` |
| `owner_agent` | `string` | Yes | Agent to assign to. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `task_create`

Create a new task in 'pending' state. Returns task id.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `title` | `string` | Yes | Task title. | `-` |
| `created_by` | `string` | Yes | Agent or user that created the task. | `-` |
| `description` | `string` | No | Longer description. | `` |
| `owner_agent` | `string` | No | Initial owner (blank = unassigned). | `` |
| `parent_task_id` | `string` | No | Optional parent task id for sub-tasks. | `` |
| `metadata` | `object` | No | Free-form metadata. | `{}` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `task_delete`

Delete a task. Soft-delete (default) sets a tombstone that propagates via pg_sync to the warehouse and peers. Hard-delete removes the row locally and requires a prior soft-delete.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `task_id` | `string` | Yes | Task UUID. | `-` |
| `hard` | `boolean` | No | If true, permanently remove an already-tombstoned row from local SQLite. | `False` |
| `actor` | `string` | No | Actor performing the delete (audit log). | `` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `task_get`

Get full record for one task.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `task_id` | `string` | Yes | Task UUID. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `task_list`

List tasks with optional filters. Newest updated first.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `owner_agent` | `string` | No | Filter by owner agent. | `` |
| `state` | `string` | No | Filter by task state. | `` |
| `parent_task_id` | `string` | No | Filter by parent task id. | `` |
| `limit` | `integer` | No | Max tasks to return. | `50` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `task_set_result`

Set the result memory pointer for a task. Does NOT change state.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `task_id` | `string` | Yes | Task UUID. | `-` |
| `result_memory_id` | `string` | Yes | Result memory UUID. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `task_tree`

Render a recursive subtree of tasks rooted at root_task_id.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `root_task_id` | `string` | Yes | Root task UUID. | `-` |
| `max_depth` | `integer` | No | Max recursion depth. | `3` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `task_update`

Partial update for a task. Validates state transitions. On terminal state, sets completed_at.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `task_id` | `string` | Yes | Task UUID. | `-` |
| `state` | `string` | No | New state (empty = no change). | `` |
| `description` | `string` | No | New description (empty = no change). | `` |
| `metadata` | `object` | No | New metadata (empty = no change). | `{}` |
| `actor` | `string` | No | Actor making the update. | `` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

## Agent Registry & Notifications

### `agent_get`

Get full record for one registered agent.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Unique agent identifier. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `agent_heartbeat`

Update last_seen and set status=active. Errors if not registered.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Unique agent identifier. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `agent_list`

List registered agents, optionally filtered by status and/or role.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `status` | `string` | No | Filter by agent status. | `` |
| `role` | `string` | No | Filter by agent role. | `` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `agent_offline`

Mark an agent as offline.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Unique agent identifier. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `agent_register`

Register an agent (UPSERT). Sets status=active, last_seen=now.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Unique agent identifier. | `-` |
| `role` | `string` | No | Agent role or function. | `` |
| `capabilities` | `array` | No | List of capabilities. | `[]` |
| `metadata` | `object` | No | Free-form metadata. | `{}` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `agent_set_trust`

Set an agent's trust score (0.5-1.0, clamped). Trust weights that agent's assertions in memory confidence aggregation; 1.0 is neutral. Upserts the agent if absent.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Unique agent identifier. | `-` |
| `trust_score` | `number` | Yes | Trust in [0.5, 1.0]; clamped. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `notifications_ack`

Mark one notification as read.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `notification_id` | `integer` | Yes | Notification ID. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `notifications_ack_all`

Bulk-ack all unread notifications for an agent. Returns count acked.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Agent id. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `notifications_poll`

List notifications addressed to agent_id, newest first.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Recipient agent id. | `-` |
| `unread_only` | `boolean` | No | Show only unread notifications. | `True` |
| `limit` | `integer` | No | Max notifications to return. | `20` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `notify`

Send a notification to an agent. Lightweight wake signal — agents poll notifications_poll.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Recipient agent id. | `-` |
| `kind` | `string` | Yes | Notification kind/type. | `-` |
| `payload` | `object` | No | Free-form notification data. | `{}` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

## Multi-Agent Coordination

### `memory_handoff`

Hand off a task from one agent to another. Writes a new handoff-type memory owned by to_agent and links it to the given context memories with 'handoff' edges. Returns a confirmation string with the new memory id.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `from_agent` | `string` | Yes | Sending agent id. | `-` |
| `to_agent` | `string` | Yes | Receiving agent id. | `-` |
| `task` | `string` | Yes | What the receiver should do. | `-` |
| `context_ids` | `array` | No | Memory ids to link via 'handoff' edges. | `[]` |
| `note` | `string` | No | Optional free-text note. | `` |
| `task_id` | `string` | No | Optional tracked task id. | `` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_inbox`

List handoff messages addressed to agent_id, newest first. Pass unread_only=False to include already-acked items.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Receiving agent id. | `-` |
| `unread_only` | `boolean` | No | Show only unread messages. | `True` |
| `limit` | `integer` | No | Max messages to return. | `20` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_inbox_ack`

Mark a handoff memory as read (sets read_at = now).

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `memory_id` | `string` | Yes | Handoff memory UUID. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_refresh_queue`

List memories whose refresh_on timestamp has arrived and need review. Read-only — to actually refresh a memory, call memory_update with new content/refresh_on. Pass include_future=True to see all memories with refresh_on set, not just overdue ones.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | No | Restrict to memories owned by this agent. | `` |
| `limit` | `integer` | No | Max rows to return (1-500). | `50` |
| `include_future` | `boolean` | No | Include memories whose refresh_on is still in the future. | `False` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

## Chat Log System

### `chatlog_cost_report`

Aggregate tokens and cost_usd across chat_log rows. Groups: provider|model_id|host_agent|conversation_id|day.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `since` | `string` | No | ISO-8601 lower bound. | `` |
| `until` | `string` | No | ISO-8601 upper bound. | `` |
| `group_by` | `string` | No | provider\|model_id\|host_agent\|conversation_id\|day | `model_id` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `chatlog_list_conversations`

List distinct conversation_ids with turn counts and timespans.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `host_agent` | `string` | No | Filter by host agent. | `` |
| `limit` | `integer` | No | Max conversations. | `50` |
| `offset` | `integer` | No | Pagination offset. | `0` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `chatlog_promote`

Promote chat_log rows into the main memory DB under a new type (default 'conversation'). ATTACH + INSERT SELECT in separate/hybrid; UPDATE type in integrated.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `ids` | `array` | No | Specific row ids to promote. | `-` |
| `conversation_id` | `string` | No | Promote all rows in a conversation. | `` |
| `since` | `string` | No | Promote rows at-or-after this ISO-8601. | `` |
| `until` | `string` | No | Promote rows at-or-before this ISO-8601. | `` |
| `copy` | `boolean` | No | If false, delete source rows after copy. | `True` |
| `target_type` | `string` | No | Type assigned in main DB. | `conversation` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `chatlog_rescrub`

Re-apply redaction to existing chat_log rows. Requires redaction.enabled=true.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `conversation_id` | `string` | No | Filter by conversation. | `` |
| `since` | `string` | No | ISO-8601 lower bound. | `` |
| `until` | `string` | No | ISO-8601 upper bound. | `` |
| `limit` | `integer` | No | Max rows to process. | `10000` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `chatlog_search`

Search chat_log rows. FTS5 keyword when query is non-empty; filter-only when empty.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `query` | `string` | Yes | FTS5 query; empty → filter-only listing. | `-` |
| `k` | `integer` | No | Max results. | `8` |
| `conversation_id` | `string` | No | Filter by conversation. | `` |
| `host_agent` | `string` | No | Filter by host agent. | `` |
| `provider` | `string` | No | Filter by provider. | `` |
| `model_id` | `string` | No | Filter by model id. | `` |
| `agent_id` | `string` | No | Filter by agent id. | `` |
| `search_mode` | `string` | No | hybrid\|fts\|vector (integrated mode only). | `hybrid` |
| `since` | `string` | No | ISO-8601 lower bound on created_at. | `` |
| `until` | `string` | No | ISO-8601 upper bound on created_at. | `` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `chatlog_set_redaction`

Flip redaction on/off and update patterns. Persists to memory/.chatlog_config.json.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `enabled` | `boolean` | Yes | Turn redaction on/off. | `-` |
| `patterns` | `array` | No | Enabled pattern groups. | `-` |
| `redact_pii` | `boolean` | No | Also redact PII (email/phone/SSN). | `-` |
| `custom_regex` | `array` | No | User-supplied regex patterns. | `-` |
| `store_original_hash` | `boolean` | No | Store SHA-256 of pre-scrub content in metadata. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `chatlog_status`

One-call health summary of the chat log subsystem: mode, DB paths, row counts, queue depth, spill files, embed backlog, hook timestamps, redaction state, warnings.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `chatlog_write`

Append one chat turn to the chat log DB. Provenance (host_agent, provider, model_id, conversation_id) is required. Writes are async-queued — returns the row id immediately.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `content` | `string` | Yes | Message text. | `-` |
| `role` | `string` | Yes | user\|assistant\|system\|tool | `-` |
| `conversation_id` | `string` | Yes | Session/conversation UUID. | `-` |
| `host_agent` | `string` | Yes | Client: claude-code\|gemini-cli\|opencode\|aider | `-` |
| `provider` | `string` | Yes | Model provider: anthropic\|google\|openai\|local\|xai\|deepseek\|mistral\|meta\|other | `-` |
| `model_id` | `string` | Yes | Exact model id, e.g. claude-opus-4-7 | `-` |
| `turn_index` | `integer` | No | 0-based turn index within conversation. | `-` |
| `agent_id` | `string` | No | Client agent id (host:user@machine). | `` |
| `user_id` | `string` | No | Owning user id. | `` |
| `metadata` | `string` | No | Extra metadata JSON string. | `{}` |
| `tokens_in` | `integer` | No | Prompt tokens (null if unknown). | `-` |
| `tokens_out` | `integer` | No | Completion tokens (null if unknown). | `-` |
| `cost_usd` | `number` | No | Cost in USD (null → computed from price table). | `-` |
| `latency_ms` | `integer` | No | End-to-end request latency. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `chatlog_write_bulk`

Bulk-append N chat turns. Each item needs the same required fields as chatlog_write.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `items` | `array` | Yes | List of chat-turn dicts. | `-` |
| `embed` | `boolean` | No | Reserved; ignored — sweeper handles. | `False` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

## Operational Protocol

### `check_thermal_load`

Protocol #2 - Check M3 Max thermal/RAM pressure. Returns Nominal|Fair|Serious|Critical.

**Source:** mcp_proxy.py (PROTOCOL_TOOLS)

No parameters.

### `log_activity`

Archive activity to the agent log (Protocols #1-#3). category=thought for complex reasoning, hardware after thermal check, decision when user agrees to any code change, file move, or direction.

**Source:** mcp_proxy.py (PROTOCOL_TOOLS)

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `category` | `string` | Yes |  | `-` |
| `detail_a` | `string` | Yes | Primary detail (<=500 chars) | `-` |
| `detail_b` | `string` | No | Secondary detail (<=2000 chars) | `-` |
| `detail_c` | `string` | No | Tertiary detail / root cause | `-` |

### `query_decisions`

Protocol #4 - MUST call before starting any new task. Full-text search across project_decisions table for prior decisions.

**Source:** mcp_proxy.py (PROTOCOL_TOOLS)

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `keyword` | `string` | Yes | Topic keywords for the task | `-` |
| `limit` | `integer` | No | Max results | `10` |

### `retire_focus`

Protocol #5 - Clear dashboard focus when a task completes.

**Source:** mcp_proxy.py (PROTOCOL_TOOLS)

No parameters.

### `update_focus`

Protocol #5 - Call every 3 turns with a <=10-word trajectory summary.

**Source:** mcp_proxy.py (PROTOCOL_TOOLS)

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `summary` | `string` | Yes | <=10-word current trajectory | `-` |

---

## Debug Agent

### `debug_analyze`

Root cause analysis with memory-augmented reasoning. Searches past issues, reads source, uses local LLM to diagnose.

**Source:** mcp_proxy.py (DEBUG_TOOLS)

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `error_message` | `string` | Yes | The error message or symptom to analyze | `-` |
| `context` | `string` | No | Additional context (stack trace, repro steps) | `-` |
| `file_path` | `string` | No | Source file path for context | `-` |

### `debug_bisect`

Automated git bisect with LLM analysis of the offending commit.

**Source:** mcp_proxy.py (DEBUG_TOOLS)

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `test_command` | `string` | Yes | Shell command that exits 0 on success | `-` |
| `good_commit` | `string` | No | Known-good commit hash or ref | `-` |
| `bad_commit` | `string` | No | Known-bad commit | `HEAD` |

### `debug_correlate`

Cross-reference logs, git commits, and decisions to build a causal timeline.

**Source:** mcp_proxy.py (DEBUG_TOOLS)

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `log_file` | `string` | No | Log file path to parse | `-` |
| `time_range` | `string` | No | Time window (e.g. 1h, 24h, 7d) | `24h` |
| `pattern` | `string` | No | Regex pattern to filter log entries | `-` |

### `debug_history`

Search past debugging sessions and patterns. No LLM required.

**Source:** mcp_proxy.py (DEBUG_TOOLS)

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `keyword` | `string` | No | Search term | `-` |
| `limit` | `integer` | No | Max results | `10` |

### `debug_report`

Generate and persist a structured debugging report to memory.

**Source:** mcp_proxy.py (DEBUG_TOOLS)

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `issue_id` | `string` | No | Issue/ticket ID | `-` |
| `title` | `string` | Yes | Report title (required) | `-` |
| `findings` | `string` | No | Debugging findings and resolution | `-` |

### `debug_trace`

Execution flow analysis - reads source, finds callers, identifies failure points.

**Source:** mcp_proxy.py (DEBUG_TOOLS)

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `file_path` | `string` | Yes | Path to the source file | `-` |
| `function_name` | `string` | No | Function to focus on | `-` |
| `error_type` | `string` | No | Error type to look for | `-` |

---

## Lifecycle & Maintenance

### `memory_consolidate`

Consolidate old memories of the same type into summaries using the local LLM. Reduces clutter while preserving knowledge.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `type_filter` | `string` | No | Restrict to a memory type. | `` |
| `agent_filter` | `string` | No | Restrict to an agent id. | `` |
| `threshold` | `integer` | No | Min items to consolidate. | `20` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_dedup`

Find (and optionally soft-delete) near-duplicate memory items by cosine similarity over embeddings. Returns {count, groups: [{a, b, title_a, title_b, score}, ...], threshold, scanned, applied}. Use dry_run=True (default) for a preview; dry_run=False soft-deletes the second item of each pair.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `threshold` | `number` | No | Cosine similarity threshold in [0, 1]. Higher = stricter near-duplicate. | `0.92` |
| `dry_run` | `boolean` | No | Preview without applying. | `True` |
| `limit` | `integer` | No | Cap on returned groups (0 = no cap). count reflects true total regardless. | `0` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_maintenance`

Runs maintenance tasks on the memory store.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `decay` | `boolean` | No | Apply importance decay. | `True` |
| `purge_expired` | `boolean` | No | Delete expired items. | `True` |
| `prune_orphan_embeddings` | `boolean` | No | Remove orphaned embeddings. | `True` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_set_retention`

Set or update per-agent memory retention policy. Controls max memory count, TTL expiry, and auto-archival.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_id` | `string` | Yes | Agent id for policy. | `-` |
| `max_memories` | `integer` | No | Max items to retain. | `1000` |
| `ttl_days` | `integer` | No | Time-to-live in days (0 = no limit). | `0` |
| `auto_archive` | `integer` | No | Auto-archive threshold. | `1` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

## Data Governance

### `gdpr_export`

Export all memories for a data subject (GDPR data portability). Returns JSON with all memory items for the given user_id.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `user_id` | `string` | Yes | Data subject id. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `gdpr_forget`

Right to be forgotten — hard-deletes ALL data for a user_id including memories, embeddings, relationships, and history.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `user_id` | `string` | Yes | Data subject id to forget. | `-` |
| `compliance` | `object` | No | Optional operator-supplied record of the erasure's program-layer context, logged to the tamper-evident audit trail (not required; only the operator knows these). Recognized keys: legal_basis (Art. 17(1) ground), reason, verified_by, verification_method, authorized_by, external_ref (case/ticket #), retained_note (Art. 17(3) exemption). Program-level record-keeping remains the operator's responsibility — see docs/COMPLIANCE.md. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_export`

Export memories as portable JSON. Filter by agent, type, or date.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `agent_filter` | `string` | No | Restrict to an agent id. | `` |
| `type_filter` | `string` | No | Restrict to a memory type. | `` |
| `since` | `string` | No | ISO-8601 start date. | `` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_import`

Import memories from a JSON export. UPSERT semantics — safe to re-run.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `data` | `string` | Yes | JSON export string. | `-` |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

## Infrastructure Operations

### `embedder_status`

Check the status of the local sovereign embedder server (default port 8082, override via M3_EMBED_FALLBACK_URL).

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

### `memory_cost_report`

Returns current session operation counts and estimated token usage for memory operations.

**Source:** mcp_tool_catalog.py

**Parameters:**

| Parameter | Type | Required | Description | Default |
| --- | --- | --- | --- | --- |
| `database` | `string` | No | Optional SQLite database path. Overrides M3_DATABASE env and the default memory/agent_memory.db for this call only. Empty = use default. | `` |
| `timeout` | `number` | No | Optional per-call timeout in seconds. Overrides the M3_TOOL_TIMEOUT env and the 30s default for this call only. Use a larger value for long-running ops; <= 0 disables the timeout entirely. | `30` |

---

