kb_retain
Store a fact, rule or event in your team's memory. For the CURRENT STATE of something that changes (a version, which model is in use, who owns what, where something runs) pass key: each key keeps only its current value, older values move to history, and lookups always return the latest. Make the key a short name for the thing (e.g. "production app version") and reuse the same key when it changes. For values that change (prices, stock, rankings, balances) ALWAYS set snapshot=true or an expiry: expired facts are retired automatically. To replace older memories (duplicates, or a state that has changed) pass replaces: they are retired once this is saved. The result lists the closest older memories (similar, id/date/first 80 characters by default; verbose=true for the full texts and the full note); you decide which to retire and leave the rest.
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": {
"content": "<content>"
},
"name": "kb_retain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Key of a current state (2-80 characters, e.g. "production app version"): content is the current value; saving the same key again replaces it. A new key that looks like an existing one is held back (similar_key) with the existing ones listed; if it is the same thing, use the existing key | |
| bank | No | Memory bank (leave empty for your space's default) | |
| tags | No | Optional short tags | |
| content | Yes | The fact, in a sentence or two | |
| context | No | Optional: where it came from | |
| expires | No | Expires on this date (YYYY-MM-DD) | |
| new_key | No | Only with key: set true to save after a similar_key hold-back when it really is a different thing | |
| similar | No | List the closest older memories in the result (takes a few seconds). Default: off when replaces is given, on otherwise. Set false for bulk saves | |
| verbose | No | true: the closest older memories in full (up to 300 characters each) and the full how-to note; default false: id, date and first 80 characters only, with a one-line note | |
| replaces | No | Ids of older memories this one replaces (the id at the end of each result line, up to 10): they are retired once this is saved, and can be restored | |
| snapshot | No | A value that will change: expires in 30 days | |
| valid_days | No | Expires after this many days (1-3650) |