loom_memory_apply
Preview and apply one change to many existing memories by keys, filter, or search—delete, expire, lock, label, or demote—with dry-run defaults. Never creates memories.
Instructions
WHAT: One change over many EXISTING memories, previewed first; it never creates one (save facts with loom_memory_set, one per fact). target names exactly one of keys | filter (tags_any/tags_all, memory_type, key_prefix, created_before/after, confidence_lte, source_trace) | search {query}; limit is required for filter/search; action is delete | expire | lock | label | demote with its block (expire {ttl_seconds|until, on_expire}, lock {mode}, label {tags, mode add|replace|remove}, demote {confidence_factor | confidence_delta}); reason is required. dry_run defaults to TRUE and lists every row it would touch (would_apply / refused); call again with dry_run=false to write. A locked row comes back as status 'refused', never an error. WHEN: anything that names a set rather than one key — 'forget everything about the Q3 migration', 'these are getting stale, lower their confidence', 'tag every runbook as ops', 'lock everything I saved about the incident', 'expire the meeting notes in 30 days'. WHEN NOT: One key (memory.delete / memory.set / memory.lock). A whole agent or user (memory.clear, admin, via loom_op); a user's request to delete all their data is erasure.request (via loom_op where it is not listed). Never skip the dry run when the user has not seen the list.
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": {
"target": "<target>",
"action": "<action>",
"reason": "<reason>"
},
"name": "loom_memory_apply"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lock | No | ||
| label | No | ||
| limit | No | ||
| action | Yes | ||
| demote | No | ||
| expire | No | ||
| reason | Yes | ||
| run_id | No | ||
| target | Yes | ||
| dry_run | No | ||
| namespace | No |