Search deleted memories (trash)
amber_search_deleted_memoriesSearch trash for soft-deleted memories when a user asks about something they've since deleted. Returns relevance-ranked results, with optional filters for deletion age and topics.
Instructions
Search within the trash for soft-deleted memories. Useful when the user asks about something they've since deleted. Results are ordered by relevance (higher score = better match; scores are relative within a single query). Optional max_age_days restricts to recently deleted items. Optional topics filters by topic (semantic matching). For ranking quality it takes the SAME optional steering params as amber_search_memories -- subjects, query_variants, keywords -- so trash ranking matches active search. Content is truncated to 1000 chars -- use amber_get_memory for full content. Use amber_restore_memory to bring a result back. Rate-limited (search bucket: 5000 capacity, refills ~1 per 17 seconds).
Errors: invalid_input (a parameter has the wrong type, or a date could not be parsed).
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": {
"query": "<query>",
"subjects": "<subjects>"
},
"name": "amber_search_deleted_memories"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural-language question or description of what to find. Use full sentences, not keywords. | |
| topics | No | Optional topic filter. Pass category names like 'food', 'work', 'beliefs'. Matched semantically. | |
| keywords | No | Optional EXACT lexical terms for the keyword (full-text) side of hybrid search -- the distinctive words the answer would contain. OMIT the subject's name (that is what `subjects` is for). | |
| subjects | Yes | REQUIRED, exactly as in amber_search_memories -- same parameter, same ranking role, same contract. Who is this query about? e.g. ["patrick vane"], or ["self"]/["me"] for the USER. Pass [] (or ["anyone"]) when the query has no personal focus -- that is a deliberate answer, not an omission. BOOSTS the matching person's trashed facts; never hard-filters, so a wrong guess cannot hide a memory. | |
| n_results | No | Maximum results (default 10, max 100). | |
| near_date | No | Optional ISO 8601 datetime to rank results by TEMPORAL PROXIMITY to (memories whose event_start/event_end sits closest rank higher), exactly like amber_search_memories. Pure boost; dateless memories are left in their existing relative order, though anchoring renormalises the whole set so their absolute scores move slightly (measured: about 10% lower). | |
| max_age_days | No | Only consider memories deleted within the last N days. | |
| near_date_end | No | Optional ISO 8601 datetime. With `near_date`, proximity is measured to the window [near_date, near_date_end]. REJECTED with invalid_input if `near_date` is not also given; must be on or after near_date. | |
| query_variants | No | Optional alternative phrasings of the SAME query that YOU generate -- each is embedded and searched and the results fused, exactly like amber_search_memories. | |
| metadata_filter | No | Optional EXACT-match metadata filter. Values must be SCALARS (string/number/boolean/null) -- operator objects like {"$ne": ...} and nested objects are NOT supported (rejected with invalid_input). Matching is TYPE-STRICT as well as exact: metadata stored as the number 5 is matched by 5, NOT by "5". A null VALUE matches only memories that explicitly stored a null under that key -- a memory missing the key entirely does NOT match, exactly as a wrong value would not. If a value reached you stringified (from JSON, a config file, a spreadsheet export), convert it back first -- a type mismatch returns an empty result set that looks exactly like "no such data". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | Matching memories from the trash, best first. Bring one back with `amber_restore_memory`. Empty is not an error. |