cortexdb-mcp

v0.12.0
cortexdb-mcp Checked 3 days ago Published 9 days ago

MCP 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…

ParameterTypeDescription
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…

ParameterTypeDescription
content *string
consistencyboolean
episode_typestring
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…

ParameterTypeDescription
event_id
idempotency_key
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…

ParameterTypeDescription
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.…

ParameterTypeDescription
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…

ParameterTypeDescription
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…

ParameterTypeDescription
topic *string
app_mountsboolean
at_least
coverageboolean
extra_scopes
include_graphboolean
merged_beliefsboolean
purpose
session
tenant_id

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…

ParameterTypeDescription
at_least
cursor
episode_type
limitinteger
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.

ParameterTypeDescription
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…

ParameterTypeDescription
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…

ParameterTypeDescription
query *string
reason *string
dry_runboolean
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.

ParameterTypeDescription
limitinteger
offsetinteger
tenant_id

entity_get

Get fact lineage for a subject. Maps to /v1/facts filtered by subject and /v1/facts/timeline for historical evolution.

ParameterTypeDescription
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.

ParameterTypeDescription
entity_id *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:…

ParameterTypeDescription
statement *string
confidencenumber
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.

ParameterTypeDescription
limitinteger
statusstring
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). -…

ParameterTypeDescription
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.

ParameterTypeDescription
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…

ParameterTypeDescription
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…

ParameterTypeDescription
include_textsboolean
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…

ParameterTypeDescription
cursor
include_correctionsboolean
limitinteger
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…

ParameterTypeDescription
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…

ParameterTypeDescription
cursor
descendboolean
limitinteger
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…

ParameterTypeDescription
agent
app
chain_scopes
memory_id
principal
purpose
rolestring
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.

ParameterTypeDescription
agent
app
chain_scopes
memory_id
principal
purpose
rolestring
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…

ParameterTypeDescription
scope *string
cursor
from_month
kind
limitinteger
rollup_id
to_month
topic
totalsboolean

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).

ParameterTypeDescription
cursor
limitinteger
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).

ParameterTypeDescription
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…

ParameterTypeDescription
cursor
entry_id
limitinteger
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.

ParameterTypeDescription
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.

ParameterTypeDescription
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…

ParameterTypeDescription
query *string
repo
repos
token_budgetinteger

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).

ParameterTypeDescription
repo *string
symbol *string
depthinteger

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.

ParameterTypeDescription
kind *string
repo *string
cursor
limitinteger
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…

ParameterTypeDescription
repo *string
roots *array
depthinteger
directionstring
include_dynamicboolean
max_edgesinteger
max_nodesinteger
predicates