Change agent memory
memoryChanges agent memory, markdown files under /memories, with the writing commands of Anthropic's memory tool; memory_view reads it. Each file is a static.md note in the user's /memories folder: /memories/projects/static-md.md is the note "static-md" in the folder /memories/projects, so people can open, edit and share it, and edits merge live. create writes a file, replacing the text of one that exists. str_replace replaces old_str, which must occur exactly once, with new_str. insert puts insert_text after line insert_line (0 for the top). delete removes a file, or a directory with everything in it. rename moves a file or directory from old_path to new_path. File names: up to 32 characters before ".md", of letters A-Z, digits, "-", "_" and "."; directories up to 9 levels. Encrypted notes are refused.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"command": "<command>"
},
"name": "memory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | The file or directory, under /memories (e.g. "/memories/projects/static-md.md"). Every command but rename | |
| command | Yes | What to change; view is memory_view | |
| new_str | No | str_replace: the replacement (empty or left out deletes old_str) | |
| old_str | No | str_replace: the text to replace, exactly as in the file | |
| new_path | No | rename: where it goes | |
| old_path | No | rename: the file or directory to move | |
| file_text | No | create: the whole file | |
| insert_line | No | insert: the line to insert after; 0 is the top of the file | |
| insert_text | No | insert: the text to insert |