BreethDocs v0.1
MCP

Tool reference

Every MCP tool, what it does, and what the agent passes.

Four tools surfaced over MCP. The agent decides when to call them; you don't write code against this surface directly. This page documents what the agent will pass and what it'll see in return.

add_episode

Write a prose memory.

Arguments the agent passes:

FieldTypeRequiredNotes
contentstringyesThe prose to ingest.
group_idstringno ("default")Sub-namespace within the project.
extract_intentboolno (false)Whether to run the intent annotation pipeline. Costs an intents credit when an edge gets annotated.

Returns: the same JSON shape as POST /v1/episodes.

Maps to: POST /v1/episodes — scope write.

record_fact

Write a single subject-predicate-object triple. Lower overhead than add_episode when the agent already has structured S-P-O data.

Arguments:

FieldTypeRequiredNotes
subjectstringyesSource entity name
predicatestringyesRelation (underscores → spaces)
objectstringyesTarget entity name
group_idstringno ("default")Sub-namespace
extract_intentboolno (false)Same semantics as add_episode

Returns: same shape as POST /v1/facts.

Maps to: POST /v1/facts — scope write.

Retrieve facts from the active team / project.

Arguments:

FieldTypeRequiredNotes
querystringyesNatural-language question or keyword list
group_idstringno ("default")Sub-namespace
limitintno (10)1–100

Returns: the same JSON shape as POST /v1/searchedges[] with fact, source/target nodes, and intent_meta when present.

Maps to: POST /v1/search — implicit read (every key has this).

retract

Soft-delete an edge so it stops appearing in future search results. Audit row is preserved.

Arguments:

FieldTypeRequiredNotes
edge_uuidstring (uuid)yesFrom a prior search result
reasonstringnoFree-form audit note

Returns: same shape as POST /v1/retract.

Maps to: POST /v1/retract — scope admin. If your key lacks admin, the tool errors with missing_scope and the agent reports the failure.

How the agent decides

The agent reads each tool's description (provided by the MCP server) and the user's conversation context. Common patterns:

  • User says "remember that…"add_episode.
  • User asks "what did I decide about…"search.
  • User says "that's wrong, ignore it"retract (if scope allows).

You don't have to teach Claude or Cursor how to use these — the descriptions are written so the agent can route on its own.

Errors the agent will see

Every tool can return:

  • unauthenticated — key is bad / expired
  • missing_scope — key lacks the required scope
  • quota_exceeded — monthly cap hit (writes, intents, or retrievals)
  • payment_required — subscription past-due

The error envelope shape matches the REST API. See REST overview.

On this page