삭제 확인
이전에 memory를 반환한 search를 다시 실행합니다. entry가 더 이상 나타나지 않을 때만 삭제가 확인됩니다.
search_memory({ query: "<the removed content>", limit: 5 })
// -> the removed entry must be absent공개 MCP 도구
forget
목적
사용자가 소유한 control boundary를 통해 선택한 memory, TODO 또는 Ledger-backed record를 삭제합니다. Public contract는 soft 및 hard deletion만 다루며, content를 제자리에서 바꾸려면 redact_memory를 사용합니다.
사용 시점
- 사용자가 검토된 record의 제거를 명시적으로 요청하고 가능하면 정확한 reference를 제공한 경우.
- 복구 가능한 삭제(기본 public 동작) 또는 명시적으로 확인된 영구 삭제가 필요한 경우.
- 알려진 TODO 또는 Ledger transaction ID를 동일하게 관리되는 lifecycle을 통해 제거해야 하는 경우.
사용하지 않을 시점
- content를 redact하거나 교체할 때 사용하지 않습니다. public forget은 replacement_content를 거부하므로 redact_memory를 호출합니다.
- data를 bulk-clean하기 위해 추측한 query를 사용하지 않습니다. 먼저 정확한 target을 resolve하고 검토합니다.
- 사용자가 영구적이고 되돌릴 수 없는 삭제를 명시적으로 확인하지 않았다면 mode=hard를 사용하지 않습니다.
- memory content를 수정할 때 사용하지 않습니다. 가능한 경우 update/correction workflow를 사용합니다.
- REST API는 public MCP tool보다 더 넓은 field set을 허용합니다. scope, bucket, team 및 provenance filter는 /docs/api/memory를 참고합니다.
필수 스코프
- Public forget에는 memory:write가 필요하며 deployment policy는 hard deletion에 추가 destructive capability를 요구할 수 있습니다.
- 호출자는 target의 owner/team/scope boundary에 대해 권한이 있어야 합니다.
매개변수
| 이름 | 타입 | 설명 |
|---|---|---|
memory_id | string | 제거할 record의 정확한 reference입니다. target보다 우선합니다. |
target | string | 정확한 reference를 사용할 수 없을 때의 설명용 target입니다. |
mode | string · 기본값: soft | 'soft'(기본값, 복구 가능) 또는 'hard'(영구적이며 먼저 명시적인 user confirmation 필요)입니다. 'soft_delete' 및 'hard_delete' alias도 허용되고 빈 값은 soft를 뜻합니다. 그 밖의 값은 거부됩니다. |
reason | string | 삭제와 함께 기록할 짧은 audit reason입니다. |
반환 스키마
성공 text에는 영향을 받은 opaque reference와 lifecycle status가 표시됩니다. Soft deletion은 restore path를 통해 복구할 수 있지만 hard deletion은 복구할 수 없습니다.
예제
forget({
target: "memory-id-from-recall",
mode: "soft",
reason: "User requested removal"
})오류
- Validation failure: 'soft'/'soft_delete'/'hard'/'hard_delete' 이외의 mode가 제공되었거나 replacement_content가 설정되었습니다 (redact_memory 사용).
- 401/403: token에 필요한 write/delete capability가 없거나 target에 접근할 수 없습니다.
- Ambiguous target: query_hint가 여러 record와 일치하거나 정확한 target을 확정할 수 없습니다.
- Invalid mode: hard deletion은 추론되지 않으며 지원되지 않는 mode는 public surface에서 거부됩니다.
- Not found or lifecycle conflict: 선택한 memory, TODO 또는 Ledger record가 이미 없거나 변경되었습니다.
관련 도구
- search_memory — destructive action 전에 엄격하고 승인된 결과를 찾습니다.
- remember — 실제로 필요할 때만 새 영구 record를 생성합니다.
- todos — task state를 직접 관리하고 검토된 삭제에만 forget을 사용합니다.
- ledger — governed Ledger dispatcher를 통해 financial record를 관리합니다.