5.8 The update_memory tool

Updates an existing memory. Each field except id is optional and follows “omit to leave unchanged” semantics, so a caller can correct only the tags, only the importance, only the freshness timestamps, etc. When text is supplied the embedding is regenerated; when it is omitted the embedding (and the embedding_provider / embedding_model) are left alone. At least one of text, tags, importance, expires_at, or last_confirmed_at must be supplied.

5.8.1 Inputs

id

Required integer. The memory’s id.

text

String. Optional. Replacement text; same length and secret-shape constraints as remember. Omit to leave text and embedding unchanged.

tags

Array of strings. Optional. Replaces the tag list entirely if provided.

importance

Number, 0–1. Optional.

expires_at

ISO 8601 timestamp. Optional.

last_confirmed_at

ISO 8601 timestamp. Optional. To refresh just this field without otherwise touching the row, prefer the confirm tool.

dry_run

Boolean. Optional, default false. When true, validate the request and report which fields would change, but make no writes.

5.8.2 Output

{
  "ok": true,
  "memory_id": 123,
  "dry_run": false,
  "changed_fields": ["tags", "importance"],
  "message": "Ok"
}

changed_fields lists the field names the caller asked to change. On a dry-run, message reads "Would update" instead. Updating a soft-deleted memory fails with NOT_FOUND — forget and re-add instead.

5.8.3 Errors

INVALID_INPUT (no fields supplied, or an out-of-range value), NOT_FOUND, SECRET_REJECTED, EMBEDDING_ERROR, DATABASE_ERROR.