set_ttl
Set a Redis key's time to live in seconds to control expiration. Specify the key and TTL duration to automatically remove data after the defined period.
Instructions
Set time to live for a key
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>",
"ttl": "<ttl>"
},
"name": "set_ttl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Redis key to set TTL for | |
| ttl | Yes | Time to live in seconds |