cache_set
Set a key-value pair in a running cache instance. Overwrites any existing value at the key — not idempotent for new data. Returns "OK" on success; returns an error if the instance_id is invalid or the instance is paused. Value can be a string or a JSON-serialized object. Optionally set a TTL in seconds (omit for no expiry). Use cache_mset instead for setting multiple keys in a single pipeline round-trip. Use cache_stream_set instead for caching LLM token streams (ordered string chunks).
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": {
"key": "<key>",
"value": "<value>"
},
"name": "cache_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Cache key | |
| ttl | No | Time-to-live in seconds (optional, omit for no expiry) | |
| value | Yes | Value to store (string or JSON) | |
| org_id | No | Optional org ID — also writes the key to the shared org namespace org:{org_id}:sem:{key} with the same TTL | |
| instance_id | No | UUID of the cache instance (from list_instances) |