get_hot_keys
Retrieve top frequently accessed keys from Valkey/Redis using LFU or idle-time metrics to identify cache-busting patterns, uneven access, and throughput bottlenecks.
Instructions
Get hot key tracking data from persisted storage. BetterDB periodically scans keys using LFU frequency scores (when maxmemory-policy is an LFU variant) or OBJECT IDLETIME / COMMANDLOG-derived frequency. Each snapshot captures the top keys ranked by access frequency. Use this to find cache-busting keys, uneven access patterns, or keys that dominate throughput. The signalType field in each entry indicates which detection mode was active (lfu or idletime).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_hot_keys"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max entries to return (default 50, max 200) | |
| endTime | No | End time (Unix timestamp ms) | |
| startTime | No | Start time (Unix timestamp ms) | |
| instanceId | No | Optional instance ID override |