Rename a subject (person) everywhere
amber_rename_subjectRelabel a person across every memory tagged with them when a name changes or expands, merging all existing facts onto one exact-match subject so retrieval no longer misses outdated or partial names.
Instructions
Relabel a subject (person) across EVERY memory tagged with them -- use when a name changes, or when you learn more of it (you stored facts under "sean" and later learn it is "sean okafor"). Subject retrieval is EXACT-MATCH, so a bare first name or an outdated name is a latent retrieval miss; this fixes all of that person's memories at once. If some of those memories already carry new_subject, they MERGE onto the one name -- merged_into_existing reports how many. NEVER deletes a memory. A plain rename (target name unused) is fully reversible by renaming back. A MERGE IS NOT REVERSIBLE: once two names are one, renaming back moves ALL of those memories to the old name, including the ones that never had it -- the original split cannot be restored through this tool. So when merged_into_existing would be > 0 you are performing a ONE-WAY operation: be correspondingly sure, and prefer confirming with the user first. Both names match case-insensitively and are normalized the same way stored subjects are (call amber_list_subjects to see exact spellings first). Also relabels the person on any of their memories currently in the trash, so restoring one later stays consistent -- so renamed_count (total memories relabelled) can exceed the active count shown by amber_list_subjects. Returns renamed_count; 0 (a no-op, not an error) if no memory was tagged with old_subject. Requires an active subscription.
Errors: invalid_input (a name is empty, too long, or carries control characters).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_subject | Yes | The corrected / updated full name, e.g. "sean okafor". | |
| old_subject | Yes | The subject as currently stored, e.g. "sean" (case-insensitive; check amber_list_subjects). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | Always `renamed`, including when `renamed_count` is 0. Matching nothing is a no-op rather than a failure. | |
| new_subject | Yes | The normalized new subject applied. | |
| old_subject | Yes | The normalized old subject that was matched. | |
| renamed_count | Yes | Total memories relabelled from old_subject to new_subject (active + trashed). | |
| renamed_active | Yes | How many of renamed_count were ACTIVE memories -- this is the number that matches what amber_list_subjects reports. | |
| renamed_trashed | Yes | How many of renamed_count were in the trash. Trashed memories are relabelled too so a later restore stays consistent; this is why renamed_count can exceed the active count. | |
| merged_into_active | Yes | Of merged_into_existing, how many are ACTIVE -- this is the figure that reconciles with amber_list_subjects, which counts active memories only. | |
| merged_into_trashed | Yes | Of merged_into_existing, how many are in the trash. Trashed rows are counted because they are relabelled too, which is why the total can exceed what amber_list_subjects shows. | |
| merged_into_existing | Yes | Memories that ALREADY carried new_subject before this call, counting any that carried BOTH names (on those the two tags simply became one). When >0 the two names are now one person, not a plain rename -- surface that to the user, since merging two genuinely different people is hard to notice and worse than leaving them split. |