Skip to content
Docs menu

Tool reference · Edit, history & reports

memory_update

Replaces a record with a new version, keeping the old one in history. Name the record by id, or let a search query (optionally within one project) find it.

local stdio server writes destructive
Caution. With find, only the top search hit is replaced, so a vague query can supersede the wrong record: pass project, or use the id from memory_recall. A blank new_content is an error. The old record is marked superseded and removed from search.

When to use

  • A saved fact or decision is outdated and you want to replace it without deleting the history.
  • You want to record why something changed (reason is stored in the new record's context).

Parameters

NameTypeDefaultDescription
id integer — Exact record to replace; takes precedence over find
find string — Search query to find the old knowledge (when no id)
project string — Limit the find search to this project
new_contentrequired string — New content to replace with
reason string — Why updating

Example

Arguments

{
  "find": "staging database port",
  "project": "billing",
  "new_content": "Staging database runs on port 6432 behind PgBouncer; production uses 5432.",
  "reason": "PgBouncer added in front of staging"
}

Result shape

{
  "updated": true,
  "old_id": 1843,
  "new_id": 1851
}

If nothing matches, the result is { error: 'Not found', query }. With id instead of find, an id that is not active returns { error: 'Record not found in DB' }.

Values are illustrative; the keys follow the server's handler. MCP clients receive the result as JSON text content.

Server description

The description the server sends to your agent in tools/list, captured from the v14.7.0 source:

Update existing knowledge. Replaces the record `id`, or the best match for `find` (within `project` when given): supersedes it and creates a new version.

Found a mistake? Open an issue on GitHub.

Search