API Reference

memory_update

Update an existing memory node

memory_update

Update an existing memory node’s content, type, or metadata. Updates are versioned — previous state is preserved for temporal queries.

Parameters

The ID of the node to update.

New content for the node. If not provided, content remains unchanged.

New type for the node. If not provided, type remains unchanged.

Metadata to merge with existing metadata. New keys are added; existing keys are overwritten. To remove a key, set it to null.

Target graph. Defaults to your account’s default graph.

Example request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "memory_update",
    "arguments": {
      "node_id": "node_abc123",
      "content": "API response time is 100ms after caching improvements",
      "metadata": {
        "status": "achieved",
        "achieved_date": "2026-03-15",
        "previous_value": null
      }
    }
  }
}

Example response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "id": "node_abc123",
    "status": "updated",
    "version": 3,
    "updated_at": "2026-03-15T14:30:00Z",
    "changes": {
      "content": true,
      "metadata": ["status", "achieved_date", "previous_value"]
    }
  }
}

Response fields

FieldTypeDescription
idstringNode identifier
statusstringAlways "updated" on success
versionnumberNew version number
updated_atstringUpdate timestamp
changes.contentbooleanWhether content was changed
changes.metadataarrayMetadata keys that were changed

Errors

CodeDescription
INVALID_PARAMETERInvalid parameter type
NODE_NOT_FOUNDNode doesn’t exist
NO_CHANGESUpdate would result in no changes
GRAPH_NOT_FOUNDSpecified graph_id doesn’t exist

Notes

Free operation — Updates don’t count against your query limit.

Metadata merging

Metadata is merged, not replaced:

Before:

{"status": "in_progress", "priority": "high"}

Update:

{"status": "completed", "completed_date": "2026-03-15"}

After:

{
  "status": "completed",
  "priority": "high",
  "completed_date": "2026-03-15"
}

Removing metadata keys

Set a key to null to remove it:

{
  "metadata": {
    "temporary_flag": null
  }
}

Version history

Each update creates a new version. Retrieve history with temporal queries:

{
  "name": "memory_get_versions",
  "arguments": {
    "node_id": "node_abc123"
  }
}

Or query the node’s state at a specific point in time:

{
  "name": "memory_recall",
  "arguments": {
    "query": "API response time",
    "time_range": {
      "end": "2026-02-28T23:59:59Z"
    }
  }
}

Relationships

memory_update doesn’t modify relationships. To change edges:

  1. Create new edges via memory_store with relationships
  2. Or delete the node and recreate it with new relationships

Concurrent updates — If multiple clients update the same node simultaneously, the last write wins. Implement optimistic locking in your application if needed.