cortexdb-mcp
v0.12.0MCP Server for CortexDB — expose memory operations to AI agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
cortexdb_check_call
Check a CortexDB call BEFORE you write it. Returns the correction if wrong. Use this whenever you are about to write a CortexDB HTTP request or SDK call and have not just read the docs for it. It is cheaper than guessing and it catches the confident guess - `POST /v1/memories`, `client.remember(...)`, a scope segment missing its `key:` prefix - which is the failure that actually produces broken integrations. Searching the docs only helps if you already know you are unsure; this does not require you to know that. No network call, no credentials, instant. P…
| Parameter | Type | Description |
|---|---|---|
call * | string | |
body |
memory_store
Store a new memory in CortexDB via POST /v1/experience. An agent's chain token may be redirected to its writer's private space (the answer names where it landed). Tag a session's memories with a capture label (``tags=["cap:<session>"]``) to forget them later in one call with ``forget_by_key``. Parameters ---------- content: The textual content to remember. source: Origin tag (e.g. "slack", "github", "cursor"). Surfaced as a label. episode_type: Episode kind. Surfaced as ``type:<value>`` label. tenant_id: Scope path overr…
| Parameter | Type | Description |
|---|---|---|
content * | string | |
consistency | boolean | |
episode_type | string | |
idempotency_key | ||
namespace | ||
provenance | ||
source | ||
tags | ||
tenant_id | ||
ttl_seconds |
memory_status
Check whether a stored memory landed and how far it has progressed, via GET /v1/experience/status. Use this after a memory_store call timed out or errored to decide whether to retry. The answer carries the server's own advice (``resend``): by idempotency key, "not found" means re-storing is safe if the write was sent within 24 hours; by event id, "not found" means erased, forgotten or not visible to you, so do not re-store on that answer. Parameters ---------- event_id: The ``Event ID`` returned by ``memory_store``. idempotency_key: Alte…
| Parameter | Type | Description |
|---|---|---|
event_id | ||
idempotency_key | ||
tenant_id |
memory_search
Search CortexDB for relevant memories via POST /v1/recall. On a live voice call, pass ``profile="voice"``: the short read path of a spoken turn and a small result. Parameters ---------- query: Natural-language search query. tenant_id: Scope override. max_results: Best-effort cap on returned items (v1 returns a StratifiedPack; we project the first N events). extra_scopes: More scopes to search in the same ranked pass (at most 40), each read exactly and authorized as a direct read of it. coverage: Also r…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
at_least | ||
coverage | boolean | |
extra_scopes | ||
max_results | integer | |
profile | ||
purpose | ||
session | ||
tenant_id |
call_brief
Call once when a live voice call starts, where the server runs in voice mode (``CORTEX_PROFILE=voice``, ``voice_sessions_v1``): it opens the call's session at the caller's scope via POST /v1/sessions and returns the call's brief, what to know before the first turn (whether the caller called before and when, the newest memories, and with ``query`` the memories about the reason for the call). The server then holds the caller's memories in RAM for the call: pass the same ``session`` to ``memory_search`` with ``profile="voice"`` on each turn. Calling it again with t…
| Parameter | Type | Description |
|---|---|---|
session * | string | |
idle_timeout_s | ||
max_tokens | ||
query | ||
tenant_id |
memory_forget
Forget derived knowledge via POST /v1/forget, under the server's default cascade (``derived_only``): with ``query``, the facts about that subject and the beliefs and understanding they support; without it, every derived record in the scope (facts, beliefs, episodes, understanding). The captured memories themselves (events) are KEPT either way, and the answer's warnings say so. To delete memories use ``memory_delete`` (by event id) or ``forget_by_key`` (by the keys they were written with). To fix a wrong memory, correct it instead (``memory_correct``, CortexDB 0.…
| Parameter | Type | Description |
|---|---|---|
reason * | string | |
from_preview_id | ||
query | ||
tenant_id |
forget_preview
Preview what a forget would delete WITHOUT deleting anything. Maps to POST /v1/forget/preview — same selector semantics and same refusals as memory_forget / memory_delete, but nothing is removed. Use this before any destructive call to check the blast radius: the response shows estimated per-layer deletion counts plus a preview ID (``fpvw_...``) to pass to ``memory_forget`` as ``from_preview_id`` so the delete executes exactly what was reviewed. Parameters ---------- query: Optional ``about_subject`` selector (same as memory_forget's ``qu…
| Parameter | Type | Description |
|---|---|---|
memory_ids | ||
query | ||
tenant_id |
get_context
Retrieve rich contextual information about a topic. Calls /v1/recall in holistic mode, which combines events, facts, and beliefs into a synthesized context block. Parameters ---------- topic: The entity or topic to retrieve context for. tenant_id: Scope override. include_graph: When true, also fetch /v1/beliefs/why for graph relationships. Ignored when no beliefs match the topic. extra_scopes: More scopes read in the same pass (at most 40). coverage: Also report what was searched and each gap, with its reason…
| Parameter | Type | Description |
|---|---|---|
topic * | string | |
app_mounts | boolean | |
at_least | ||
coverage | boolean | |
extra_scopes | ||
include_graph | boolean | |
merged_beliefs | boolean | |
purpose | ||
session | ||
tenant_id |
advanced_search
Search with structured filters. Maps to POST /v1/recall. ``coverage`` also reports what was searched and each gap; ``at_least`` waits for a consistency token from ``memory_store``; ``purpose`` declares what the read is for (default ``CORTEXDB_PURPOSE``), and ``session`` the conversation session it is made in, as ``memory_search``'s do. Time filters become a ``temporal.valid_during`` window, evaluated server-side against each event's ``observed_at``. Source / episode_type become the ``source:`` / ``type:`` labels ``memory_store`` writes: one is pushed down as a…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
at_least | ||
coverage | boolean | |
episode_type | ||
limit | integer | |
offset | integer | |
purpose | ||
session | ||
source | ||
tenant_id | ||
time_range_end | ||
time_range_start |
memory_list
List a scope's events, newest first, a page at a time. Maps to GET /v1/events?scope=...&limit=... Parameters ---------- tenant_id: Scope override. limit: Events per page (1 to 1000). cursor: The next page: the ``cursor=`` value a previous page ended with. CortexDB 0.14.0 pages its event listing by an opaque cursor (``le1.``) bound to the listing that issued it, so send it with the same ``tenant_id`` and ``episode_type``; any other value, a number included, is 422 ``INVALID_CURSOR``. episode_type: Only…
| Parameter | Type | Description |
|---|---|---|
at_least | ||
cursor | ||
episode_type | ||
limit | integer | |
tenant_id |
memory_get
Get a single event by id. Maps to GET /v1/events/{id} (FRI-11). ``tenant_id``, when given, is the event's exact scope (``?scope=``): the read is confined to it, and an event elsewhere answers the same 404 as a missing one. A cluster routes a by-id read by it and refuses one without (501 ``CLUSTER_ROUTE_UNSUPPORTED``). Omitted, on a single node the event is read wherever it lives. ``at_least``: a consistency token to wait for first.
| Parameter | Type | Description |
|---|---|---|
episode_id * | string | |
at_least | ||
tenant_id |
memory_delete
Delete one memory (an event) by id, with everything derived from it, via POST /v1/forget with ``selector.memory_ids=[id]``. Irreversible. An id stored in another scope deletes nothing and answers like a missing one (``matched 0``). ``from_preview_id``: the ``fpvw_...`` id of a ``forget_preview`` of exactly this id, attesting it was reviewed. This tool used to send ``confirm_all: true`` ALONGSIDE the selector, which the server refuses with 400 AMBIGUOUS_SELECTOR_CONFIRM_ALL on every call — ``confirm_all`` authorizes a SCOPE-WIDE erase and would ignore the sele…
| Parameter | Type | Description |
|---|---|---|
episode_id * | string | |
from_preview_id | ||
tenant_id |
memory_bulk_delete
Forget the derived knowledge about one subject, in bulk, via POST /v1/forget with ``selector.about_subject=<query>`` (cascade ``derived_only``): the facts whose subject is ``query`` (byte for byte, or an ``ent_...`` id) and the beliefs and understanding they support. The captured memories (events) are KEPT: delete those by id with ``memory_delete``. Irreversible; ``dry_run`` previews instead. Parameters ---------- query: The fact subject to forget (``about_subject``). reason: Audit-trail reason for the deletion. tenant_id: Scope…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
reason * | string | |
dry_run | boolean | |
tenant_id |
entity_list
List the subjects CortexDB holds facts about. Backed by /v1/facts: we surface unique fact subjects up to `limit`. Facts exist where the server learns from memories (enrichment on) or where typed triples were stored; an empty list can mean neither happened. Use ``entity_edges`` for relationships.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
offset | integer | |
tenant_id |
entity_get
Get fact lineage for a subject. Maps to /v1/facts filtered by subject and /v1/facts/timeline for historical evolution.
| Parameter | Type | Description |
|---|---|---|
entity_id * | string | |
tenant_id |
entity_edges
List the relationships (predicates) involving a subject. Maps to /v1/facts filtered by subject; predicate is the edge label.
| Parameter | Type | Description |
|---|---|---|
entity_id * | string | |
tenant_id |
entity_link
Create a relationship between two entities. v1 doesn't expose a direct fact-write endpoint — facts are produced by the LLM extractor on stored experiences. The cleanest way to "link" two entities is to STORE an experience that states the relationship; the extractor will then emit a fact triple. This is exactly what we do.
| Parameter | Type | Description |
|---|---|---|
relationship * | string | |
source_entity_id * | string | |
target_entity_id * | string | |
confidence | number | |
fact | string | |
tenant_id |
belief_declare
Declare a belief directly in the belief layer. Maps to POST /v1/beliefs. Unlike entity_link (which stores an experience and waits for the extractor), this writes the belief record immediately and can cite evidence. Declaring a newer belief over the same (subject, predicate) closes the previous one — use it to assert or revise what the agent currently holds true. Parameters ---------- statement: The claim in plain language (e.g. "Alice leads the Nimbus project"). confidence: Point estimate in [0, 1]. Defaults to 0.8. supports:…
| Parameter | Type | Description |
|---|---|---|
statement * | string | |
confidence | number | |
idempotency_key | ||
predicate | ||
provenance | ||
subject | ||
supports | ||
tenant_id |
list_conflicts
List detected memory conflicts (contradicting values for the same claim). Maps to GET /v1/conflicts. Parameters ---------- tenant_id: Scope override (defaults to the configured scope). status: "open" (default) for unresolved conflicts only, or "all". limit: Max conflicts to return.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
status | string | |
tenant_id |
resolve_conflict
Resolve a memory conflict. Maps to POST /v1/conflicts/{id}/resolve. Parameters ---------- conflict_id: The conflict UUID (from list_conflicts). action: One of: - "pick": one record wins outright — requires `winner` (record UUID); `reason` optional. - "split": both values were true at different times — requires `boundary` (absolute date, e.g. "2024-03"), `earlier` and `later` (record UUIDs). - "new_information": the record supersedes the older value — requires `record` (record UUID). -…
| Parameter | Type | Description |
|---|---|---|
action * | string | |
conflict_id * | string | |
boundary | ||
earlier | ||
later | ||
reason | ||
record | ||
tenant_id | ||
winner |
claim_history
Show the full bi-temporal change-log of one claim — every valid interval and every record-time correction, plus any conflicts involving it. Maps to GET /v1/claims/history. Parameters ---------- subject: The claim's subject entity (e.g. "Alice"). predicate: The claim's predicate (e.g. "works_at"). tenant_id: Scope override.
| Parameter | Type | Description |
|---|---|---|
predicate * | string | |
subject * | string | |
tenant_id |
memory_why
Say why CortexDB holds a fact or a belief, or what it learned from a memory: where it came from and how it was made. Use it when the user asks "why do you think that?", "where did that come from?" or "did you learn anything from what I told you?", or before relying on a fact you did not store yourself. Changes nothing. Pass one id: - a fact (``fact_...``, as recall, ``get_context`` or the entity tools return them): its claim; how it was made, learned by CortexDB's extraction or declared by a writer, with the model, the prompt version, the gate versio…
| Parameter | Type | Description |
|---|---|---|
memory_id * | string | |
tenant_id |
derivation_policy
Say what CortexDB learns at a scope, and what it will not: whether it turns the memories stored there into facts, beliefs and episodes at all (and if not, why: enrichment off on the server, the scope outside its allowlist, the scope's enrich setting off, an application's reference root, or a policy whose mode is off), the mode (every memory, only the ones marked memory:remember, or each candidate held for review), what is never learned or only with consent, and who set each rule (a policy at the scope or above it, the org chart, or the person's own settings), the…
| Parameter | Type | Description |
|---|---|---|
include_texts | boolean | |
scope |
memory_about
Say everything CortexDB knows about a subject: the live facts and beliefs at its scope, each with its id and the memories it came from (an event id, when, a snippet). Use it when the user asks "what do you know about me?", for a person's access or export request, and before correcting a memory: it lists the fact ids memory_correct takes. An item any of whose sources you may not read is left out and not counted. Changes nothing. Needs CortexDB 0.15.0 (``corrections_v1``). Parameters ---------- scope: The subject's scope (default: the configured scope…
| Parameter | Type | Description |
|---|---|---|
cursor | ||
include_corrections | boolean | |
limit | integer | |
scope |
memory_inspect
Say what one memory is, in one read: an event (evt_...), a fact (fact_...) or a belief (belief_...), with its label (observed: what was written; inferred: what CortexDB worked out from observed events; uncertain: inferred but not settled; not learned: an observed event nothing was learned from) and the rule that chose it, why memory holds it (its derivation, a fact's sources with where its quote sits), what changed it (when and why a fact was replaced, the corrections and conflicts of its claim) and whether you may forget or erase it. Use it before trusting, cor…
| Parameter | Type | Description |
|---|---|---|
memory_id * | string | |
sections | ||
tenant_id |
review_list
List what CortexDB held back for review before learning it: the candidates a derivation policy held (a sensitive topic such as health, a predicate marked for review, a policy in review mode, a low confidence) at a scope, oldest first, each with its held id, what it states, the rule that held it, when it lapses undecided, and the text around its quote when you may read its memory. A held candidate is in no store, recall or answer until a reviewer approves it. Use it when the user asks what is waiting for review, or before review_decide. Changes nothing. Needs Cor…
| Parameter | Type | Description |
|---|---|---|
cursor | ||
descend | boolean | |
limit | integer | |
rule | ||
scope | ||
topic |
access_check
Can this principal read (or write, or own) this scope or memory? Asks POST /v1/access/check and answers ALLOWED or DENIED with the link that decided it (capability, confinement, tenant, person, app, label, ...) and each link's deciding path. Changes nothing. Without ``principal`` it answers for your own token, including its confinement; where you hold no role at the scope every denial reads alike (``not_authorized``). Asking for another principal takes an Owner of the scope or the operator key. Parameters ---------- scope: The scope decided, or…
| Parameter | Type | Description |
|---|---|---|
agent | ||
app | ||
chain_scopes | ||
memory_id | ||
principal | ||
purpose | ||
role | string | |
scope |
access_explain
Why may (or may not) this principal see this scope or memory? Asks POST /v1/access/explain: the memory's home decision link by link with each deciding path, one decision per atom a derived or agent-written memory carries (an atom you may not read is redacted), a derived memory's supports, and the label against the path's cap. Changes nothing. Same arguments as ``access_check``; use ``access_check`` for a yes or no.
| Parameter | Type | Description |
|---|---|---|
agent | ||
app | ||
chain_scopes | ||
memory_id | ||
principal | ||
purpose | ||
role | string | |
scope |
rollups
Read an org-tree unit's rollups: the typed totals (events per month, counts per intent and label family, numeric measures) and the synthesis items (beliefs that keep each child's position, concepts, learnings) its rollup home holds, as GET /v1/rollups serves them to you. You need Summary or above at the home and must read every input a rollup used; one you may not is absent, not an error. Parameters ---------- scope: The unit (``org:acme/team:eng``) or its rollup home (``org:acme/team:eng/aud:roll``). rollup_id: One rollup by id (GET…
| Parameter | Type | Description |
|---|---|---|
scope * | string | |
cursor | ||
from_month | ||
kind | ||
limit | integer | |
rollup_id | ||
to_month | ||
topic | ||
totals | boolean |
notices
Your own unacknowledged notices (GET /v1/access/notices?mine=true): each time someone read what is yours in a way that must tell you, such as an operator's break-glass read of your private region or a read of your work under a grant, with who read it, when, and why. Oldest first. Acknowledge them with ``acknowledge_notices``. Parameters ---------- scope: Any scope of the tenant; its root is used (default: the configured scope's). limit / cursor: Paging (1 to 1000).
| Parameter | Type | Description |
|---|---|---|
cursor | ||
limit | integer | |
scope |
acknowledge_notices
Acknowledge your own notices (POST /v1/access/notices/ack), so they are no longer listed. Changes only your notices, never memory; repeating it changes nothing. A seq of a notice that does not tell you refuses the whole call. Parameters ---------- seqs: The notices' ``seq`` numbers, from ``notices`` (at most 4,096). through: Instead, or as well: a watch position (``wp1....``); every notice at or before it that tells you. scope: Any scope of the tenant; its root is used (default: the configured scope's).
| Parameter | Type | Description |
|---|---|---|
scope | ||
seqs | ||
through |
directory_lookup
Look people (and named scopes) up in your tenant's directory: by a name or email prefix (GET /v1/directory?q=), or one entry by id (GET /v1/directory/{id}). You see only what you may read: names, titles and status for anyone in the tenant; emails and accounts only as an Owner of the tenant root, the operator, or for your own entry; a private scope's name only as one of its readers. Changes nothing. Parameters ---------- query: A prefix of a display name or email, compared case-folded (1 to 200 characters). entry_id: Instead: a principal (``u…
| Parameter | Type | Description |
|---|---|---|
cursor | ||
entry_id | ||
limit | integer | |
query | ||
scope |
health_check
Check that the server is reachable and the bearer token works. Maps to GET /v1/auth/whoami — succeeds iff the token verifies AND the caller passes the deployment policy gate. For an agent's chain token (CortexDB 0.14.0) it also names the chain: the agent (act), the application (app), the client kind and the run.
get_usage
Get current token + tier info. Maps to /v1/auth/whoami plus the rate-limit headers (FRI-7). Per-caller usage counters require a separate subsystem and aren't exposed on v1 yet.
| Parameter | Type | Description |
|---|---|---|
tenant_id |
get_insights
Generate proactive insights from stored memories. Analyzes the scope's events, facts, and beliefs to surface contradictions, low-confidence knowledge, key entities, activity spikes, and new sources. A layer the caller may not read is named, not silently skipped.
| Parameter | Type | Description |
|---|---|---|
tenant_id |
code_explore
Explore one or many registered repositories with a natural question or task description. Returns a token-budgeted evidence envelope: verbatim source snippets with `repo:path@<snippet-hash>#Lstart-Lend` citations (the hash is the first 16 hex characters of BLAKE3 over the snippet text, not a git commit), coverage counts, honest uncertainty notes, and pre-action warnings (prior failed attempts, stale claims about the symbols involved). Read-only. Parameters ---------- query: The question or task ("how does invoice settlement work?", "tight…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
repo | ||
repos | ||
token_budget | integer |
code_impact
What is affected if this symbol changes — the reverse dependency closure via GET /v1/code/impact. Every reached symbol reports its hop distance and the WEAKEST precision tier on its path (a compiler-grade start reached through a syntax-tier edge is syntax-grade knowledge, and says so). Read-only; bounded depth. Parameters ---------- symbol: The symbol name to assess (e.g. ``settle`` or ``chargeCard``). repo: The registered repository name. depth: Traversal depth (clamped 1..6).
| Parameter | Type | Description |
|---|---|---|
repo * | string | |
symbol * | string | |
depth | integer |
code_inventory
Return a bounded repository-wide structural inventory without a database scan. ``kind`` is one of ``stats``, ``definitions``, ``symbols``, ``files``, ``routes``, ``architecture``, or ``unreferenced_definitions``. ``symbols`` requires an exact name ``prefix``; ``files`` optionally lists immediate children under ``path``. The unreferenced kind is explicitly a candidate list: reflection and incomplete compiler coverage are reported as uncertainty, never hidden. Read-only and generation-fenced.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
repo * | string | |
cursor | ||
limit | integer | |
path | ||
prefix |
code_graph
Run one bounded structured graph traversal from exact indexed symbols, files, routes, events, configuration keys, or endpoints. Every edge retains its predicate, precision tier, and resolution status. Use ``code_explore`` for natural-language questions and this tool for explicit topology. Read-only. ``direction`` is outgoing, incoming, or both. ``depth`` is clamped to 1..6; node and edge limits are hard. Dynamic approximations are excluded unless explicitly requested. A bare name returns every identity that carries it; C++ members also resolve as ``Class::metho…
| Parameter | Type | Description |
|---|---|---|
repo * | string | |
roots * | array | |
depth | integer | |
direction | string | |
include_dynamic | boolean | |
max_edges | integer | |
max_nodes | integer | |
predicates |