memory.correct

Live

Apply a correction to an existing memory episode.

CategoryMemory
JSON-RPCtools/call
EndpointPOST /mcp
Sourcepackages/mcp-tools/src/tools/memory-correct.ts

Description

Records a correction against an existing episode. Corrections do not overwrite — Cortex keeps the original observation and the corrected text linked, so reversals and contradictions are auditable.

Input schema

FieldTypeRequiredDescription
episode_idstringyesEpisode ID to correct.
correctionstringyesCorrected content or summary.
reasonstringnoOptional reason for the correction.

Output shape

typescript
{
  ok: boolean;
  error?: string;
}

Example call

JSON-RPC tools/call request body (omit the JSON-RPC envelope when using an SDK; the SDK adds it for you):

jsontools/call params
{
  "name": "memory.correct",
  "arguments": {
    "episode_id": "ep_01HXR4N9TZ5W2QF6KMVDX8Y3GP",
    "correction": "Sarah leads the Platform team at Acme (not API).",
    "reason": "Confirmed in 1:1 on 2026-05-27"
  }
}

Example response

Tool results are always wrapped as content[0].text with a stringified JSON body. The shape below is what you get back from JSON.parse(result.content[0].text):

jsonparsed result body
{ "ok": true }

Errors this tool can return

CodeMeaning
invalid_argumentsTool input failed Zod validation.
unauthorizedMissing or invalid bearer token.

See the full error catalog for resolution steps on each code, plus the standard transport-layer responses (401, 429).