Fix a memory's subject, tags, or metadata
amber_update_memoryCorrect a stored memory's subject, topic tags, or metadata after the fact without changing the fact's wording. Fixes mis-attributed or stale memories, including ones in the trash.
Instructions
Correct a stored memory after the fact. Use this when you notice -- e.g. while reviewing search results -- that a memory has the WRONG or MISSING subject (who it's about), a wrong/missing topic tag, or stale metadata. Does NOT change the fact's wording; to reword a fact, delete it and store the corrected version. Works on TRASHED memories too, deliberately: correcting a subject or tag while a memory sits in the trash keeps it coherent for a later restore -- the same reason amber_rename_subject relabels trashed records.
Pass memory_id plus only the fields you want to change:
subject: who the memory is about, e.g. "patrick" or "patrick's father". Fixes mis-attributed facts (e.g. a fact about the user's dad wrongly tagged as the user). It REPLACES every subject, sosubject: ""removes them all.rederive_subject: true to re-extract the subject from the memory's own content (use when it's clearly wrong but you don't know the right value). Ignored ifsubjectis given.add_topics/remove_topics: topic/category names to add or remove, e.g. ["health"].add_subjects/remove_subjects: person name(s) to add or remove as co-subjects WITHOUT clobbering the others -- e.g. a fact naming two people that was tagged with only one: add_subjects: ["tjeerd spruijt"]. (Usesubjectto REPLACE the whole subject set instead.)set_metadata: object of metadata fields to set or overwrite, e.g. { "importance": "high" }.clear_metadata: metadata field names to remove, e.g. ["importance"].
Reuse existing names: subjects are matched by EXACT (case-insensitive) text -- call amber_list_subjects and reuse the stored spelling -- while topics are matched SEMANTICALLY -- call amber_list_topics.
Example -- a fact about the user's father is tagged as the user: amber_update_memory({ memory_id: "...", subject: "patrick's father" }). Returns the updated memory. Requires an active subscription.
Errors: not_found (no memory with that id on this account; a trashed memory is found and updated), invalid_input (a field has the wrong type, nothing to change was supplied, or the change would leave the memory over a store limit: 3 topics, 4000 bytes of metadata).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subject | No | Set who this memory is about, e.g. "patrick" or "patrick's father". Lowercase named subject. | |
| memory_id | Yes | UUID of the memory to update (from search/list results). | |
| add_topics | No | Topic/category names to add as tags (e.g. ["health", "food"]). Matched semantically; call amber_list_topics to reuse existing names. | |
| add_subjects | No | Lowercase person name(s) to ADD as co-subjects without clobbering existing ones (e.g. ["tjeerd spruijt"]). Use when a fact names more than one person but was tagged with only some. Matched by exact text; call amber_list_subjects to reuse the stored spelling. Use FULL names: adding a bare first name that merely matches an existing subject can attach this memory to the WRONG person of that name -- if you are not certain who is meant, ask the user first. | |
| set_metadata | No | Metadata fields to set or overwrite (e.g. { "source": "chat" }). | |
| remove_topics | No | Topic/category names to remove from this memory. | |
| clear_metadata | No | Metadata field names to remove (e.g. ["source"]). | |
| remove_subjects | No | Lowercase person name(s) to remove from this memory's subjects. | |
| rederive_subject | No | Re-extract the subject from the memory's content (use when it's wrong but you don't know the correct value). Ignored if `subject` is also given. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memory | Yes | The memory as it now stands. Its `content` is unchanged: this tool edits labels, never wording. |