monitor
v1.7.0BetterDB MCP server - Valkey and Redis observability for Claude Code and other MCP clients
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_instances
List all Valkey/Redis instances registered in BetterDB. Shows connection status and capabilities.
select_instance
Select which instance subsequent tool calls operate on.
| Parameter | Type | Description |
|---|---|---|
instanceId * | string | The instance ID to select |
add_connection
Add a new Valkey/Redis connection to BetterDB. Optionally set it as the active default.
| Parameter | Type | Description |
|---|---|---|
host * | string | Hostname or IP address |
name * | string | Display name for the connection |
password | string | Auth password |
port | integer | Port number |
setAsDefault | boolean | Set this connection as the active default |
username | string | ACL username (default: "default") |
test_connection
Test a Valkey/Redis connection without persisting it. Use before add_connection to validate credentials.
| Parameter | Type | Description |
|---|---|---|
host * | string | Hostname or IP address |
name * | string | Display name for the connection |
password | string | Auth password |
port | integer | Port number |
username | string | ACL username (default: "default") |
remove_connection
Remove a connection from BetterDB.
| Parameter | Type | Description |
|---|---|---|
instanceId * | string | The instance ID to remove |
set_default_connection
Set a connection as the active default for BetterDB.
| Parameter | Type | Description |
|---|---|---|
instanceId * | string | The instance ID to set as default |
get_info
Get INFO stats for the active instance. Contains all health data: memory, clients, replication, keyspace, stats (hit rate, ops/sec), and server info. Optionally filter to a section: server|clients|memory|stats|replication|keyspace.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
section | string | INFO section to filter (server, clients, memory, stats, replication, keyspace) |
get_slowlog
Get the most recent slow commands from the slowlog.
| Parameter | Type | Description |
|---|---|---|
count | number | Number of entries to return (default 25) |
instanceId | string | Optional instance ID override |
get_commandlog
Get the most recent entries from COMMANDLOG (Valkey 8+ only, superset of slowlog).
| Parameter | Type | Description |
|---|---|---|
count | number | Number of entries to return (default 25) |
instanceId | string | Optional instance ID override |
get_latency
Get latency event history for the active instance.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_memory
Get memory diagnostics: MEMORY DOCTOR assessment and MEMORY STATS breakdown.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_clients
Get the active client list with connection details.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_health
Get a synthetic health summary for the active instance: keyspace hit rate, memory fragmentation ratio, connected clients, replication lag (replicas only), and keyspace size. Use this as the first call when investigating an instance — it surfaces the most actionable signals without requiring you to parse raw INFO output.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_slowlog_patterns
Get analyzed slowlog patterns from persisted storage. Groups slow commands by normalized pattern, showing frequency, average duration, and example commands. Survives slowlog buffer rotation — data goes back as far as BetterDB has been running.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
limit | number | Max entries to analyze |
get_commandlog_history
Get persisted COMMANDLOG entries from storage (Valkey 8+ only). Supports time range filtering to investigate specific incidents. Returns empty with a note if COMMANDLOG is not supported on this instance.
| Parameter | Type | Description |
|---|---|---|
command | string | Filter by command name |
endTime | number | End time (Unix timestamp ms) |
instanceId | string | Optional instance ID override |
limit | number | Max entries to return |
minDuration | number | Min duration in microseconds |
startTime | number | Start time (Unix timestamp ms) |
get_commandlog_patterns
Get analyzed COMMANDLOG patterns from persisted storage (Valkey 8+ only). Like get_slowlog_patterns but includes large-request and large-reply patterns in addition to slow commands.
| Parameter | Type | Description |
|---|---|---|
endTime | number | End time (Unix timestamp ms) |
instanceId | string | Optional instance ID override |
limit | number | Max entries to analyze |
startTime | number | Start time (Unix timestamp ms) |
get_anomalies
Get anomaly detection events from persisted storage. BetterDB continuously runs Z-score analysis on memory, hit rate, CPU, and other metrics — this returns the detected anomalies. On a cluster an event that is about one node names it in `node` (`nodeId`, `address`, `role`, plus `shardId` and `availabilityZone` when known, and `collected`: false when no connection of the monitor points at that node, so its own metrics are not gathered; `connectionId` names the connection that collects it). Use to investigate what triggered an alert or correlate with an incident.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
limit | number | Max events to return |
metricType | string | Filter by metric type |
startTime | number | Start time (Unix timestamp ms) |
get_retry_amplification
Get the live retry-amplification detector state: whether its baseline is armed, whether a candidate or amplifying episode is open (load per client rising with latency, errors or churn while the client count stays flat), the last episode and its trigger, and the clients whose command rate or reconnects grew most. On a cluster or Sentinel group, `nodes` holds the same state for each other primary it reads. Use when an incident looks like a self-sustaining retry storm rather than real traffic growth.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_hot_shards
Get the hot shards open on a cluster right now: each shard that has carried at least twice the median CPU for a minute, with its load, top slots, hot keys when they can be read, and a rebalance suggestion unless the cluster runs in Observe (see `get_placement_status`): Observe leaves out every plan and every `covered_by_other_plan` or `conflicts_with_other_plan` verdict, so `rebalance` is then missing or a `no_plan` that says why moving slots will not help. Each hot shard names its primary in `node` (`nodeId`, `address`, `role`, plus `shardId` and `availabilityZone` when known, and `collected`…
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_placement_status
Get the slot placement state of a cluster: `mode` is the stored placement mode (`observe` shows load only: `get_hot_shards` then leaves out every slot-move plan, its commands and the verdicts that point at the plan of another shard, and keeps only the verdicts that say why moving slots will not help; `recommend` also shows the suggested slot moves), `effectiveMode` is the mode in force once the support verdict is applied, and `selectableModes` lists the modes an admin can pick now. `support.issues` lists every reason the cluster cannot take slot moves, in order, each with a `reason` (`not_conn…
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_topology_disagreements
Get where the nodes of a cluster disagree about the cluster, summarised for large clusters. `disagreements` has one line per disagreement with the number of views on each side, for example "Slots 0-5460: owned by A in 9 views, by B in 3 views" or "node X: fail? in 2 views, ok in 9 views" (a round asks at most 12 nodes, so the counts never go above 12, whatever the size of the cluster): `kind` is `slot_owner`, `config_epoch`, `failure_flags` or `membership`, `positions` lists each side with its `count` and the nodes that hold it, `subjects` the nodes it is about, `confirmed` and `eventId` tell…
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
shards | string | Which shard lines to return: `disputed` (default) or `all` |
get_client_activity
Get time-bucketed client activity from persisted snapshots. Shows connection counts, command distribution, and buffer usage over time. Use startTime/endTime to focus on a specific incident window.
| Parameter | Type | Description |
|---|---|---|
bucketSizeMinutes | number | Bucket size in minutes (default 5) |
endTime | number | End time (Unix timestamp ms) |
instanceId | string | Optional instance ID override |
startTime | number | Start time (Unix timestamp ms) |
get_hot_keys
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).
| Parameter | Type | Description |
|---|---|---|
endTime | number | End time (Unix timestamp ms) |
instanceId | string | Optional instance ID override |
limit | number | Max entries to return (default 50, max 200) |
startTime | number | Start time (Unix timestamp ms) |
get_cluster_nodes
Discover all nodes in the Valkey cluster — role (master/replica), address, state, and slot ranges. Each node has a state: failed when its peers agreed it is down (the fail flag), suspect when they only suspect it (fail?, PFAIL) or it is not a full member yet (handshake, noaddr), and healthy otherwise. The healthy boolean is deprecated: it is true only when state is healthy, use state instead. On Valkey 9.1+ each node also carries shardId, and availabilityZone when the node has one configured. On older versions availabilityZone comes from the zone map set on the connection, if any. `collected…
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_cluster_node_stats
Get per-node performance stats: memory usage, ops/sec, connected clients, replication offset, and CPU. Use this to identify hot nodes, lagging replicas, or uneven load distribution.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_cluster_slowlog
Get the aggregated slowlog across ALL nodes in the cluster. This is the primary tool for finding slow commands in cluster mode — per-node slowlogs are incomplete. Returns an error message if not in cluster mode.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
limit | number | Max entries to return (default 100) |
get_slot_stats
Get per-slot key counts and CPU usage (Valkey 8.0+ only). Use orderBy='cpu-usec' to find hot slots, or 'key-count' to find the most populated slots. Returns { slots, failedNodes }; failedNodes lists cluster primaries that did not answer, whose slots are missing. Returns an error message if not supported.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
limit | number | Max slots to return (default 20) |
orderBy | string | Sort order: 'key-count' or 'cpu-usec' (default 'key-count') |
get_latency_history
Get the full latency history for a named event (e.g. 'command', 'fast-command'). Call get_latency first to see which event names are available, then use this to investigate a specific event's trend over time.
| Parameter | Type | Description |
|---|---|---|
eventName * | string | Latency event name to query |
instanceId | string | Optional instance ID override |
get_acl_audit
Get persisted ACL audit log entries from storage. Filter by username, reason (auth, command, key, channel), or time range. Use this to investigate why a connection is failing or audit access patterns.
| Parameter | Type | Description |
|---|---|---|
endTime | number | End time (Unix timestamp ms) |
instanceId | string | Optional instance ID override |
limit | number | Max entries to return |
reason | string | Filter by reason (auth, command, key, channel) |
startTime | number | Start time (Unix timestamp ms) |
username | string | Filter by username |
start_monitor
Start the BetterDB monitor as a persistent background process. If already running, returns the existing URL. The monitor persists across MCP sessions and must be stopped explicitly with stop_monitor.
| Parameter | Type | Description |
|---|---|---|
port | integer | Port for the monitor API (default 3001) |
storage | string | Storage backend (default sqlite) |
cache_list
List all caches (semantic_cache and agent_cache) registered for the active instance, with hit rate and total ops.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Connection ID; defaults to the active instance |
cache_health
Detailed health for a single cache. Response branches by type: semantic_cache reports category_breakdown + uncertain_hit_rate; agent_cache reports tool_breakdown.
| Parameter | Type | Description |
|---|---|---|
cache_name * | string | Cache name as registered in __betterdb:caches (e.g. 'betterdb_scache_prod'). |
instanceId | string | Connection ID; defaults to the active instance |
cache_threshold_recommendation
Threshold-tuning recommendation for a semantic_cache, based on the rolling similarity-score window. Errors with INVALID_CACHE_TYPE on agent_cache.
| Parameter | Type | Description |
|---|---|---|
cache_name * | string | Cache name as registered in __betterdb:caches (e.g. 'betterdb_scache_prod'). |
category | string | Restrict to a single category; omit for the global threshold |
instanceId | string | Connection ID; defaults to the active instance |
minSamples | integer | Minimum samples required (default 100) |
cache_tool_effectiveness
Per-tool hit rate, cost saved, and TTL recommendation for an agent_cache. Errors with INVALID_CACHE_TYPE on semantic_cache.
| Parameter | Type | Description |
|---|---|---|
cache_name * | string | Cache name as registered in __betterdb:caches (e.g. 'betterdb_scache_prod'). |
instanceId | string | Connection ID; defaults to the active instance |
cache_similarity_distribution
Histogram of recent similarity scores (20 buckets, width 0.1) for a semantic_cache. Errors on agent_cache.
| Parameter | Type | Description |
|---|---|---|
cache_name * | string | Cache name as registered in __betterdb:caches (e.g. 'betterdb_scache_prod'). |
category | string | Restrict to a single category |
instanceId | string | Connection ID; defaults to the active instance |
window_hours | integer | Lookback window (default 24h, max 168h) |
cache_recent_changes
Recent proposals for a single cache (any status), so agents can avoid re-proposing pending or recently-applied changes. Newest first.
| Parameter | Type | Description |
|---|---|---|
cache_name * | string | Cache name as registered in __betterdb:caches (e.g. 'betterdb_scache_prod'). |
instanceId | string | Connection ID; defaults to the active instance |
limit | integer | Max proposals to return (default 20, max 200) |
cache_propose_threshold_adjust
Propose a semantic-cache similarity-threshold change for review. Creates a pending proposal that requires human approval before any change is applied. Reasoning must be at least 20 characters.
| Parameter | Type | Description |
|---|---|---|
cache_name * | string | Name of the semantic cache (e.g. 'betterdb_scache_prod') |
new_threshold * | number | Proposed cosine-distance threshold, 0–2 |
reasoning * | string | Why the change is being proposed (≥20 chars) |
category | string | null | Optional per-category override; null/undefined = global threshold |
instanceId | string | Connection ID; defaults to the active instance |
cache_propose_tool_ttl_adjust
Propose an agent-cache per-tool TTL change for review. Creates a pending proposal that requires human approval. Reasoning must be at least 20 characters.
| Parameter | Type | Description |
|---|---|---|
cache_name * | string | Name of the agent cache (e.g. 'betterdb_agentcache_prod') |
new_ttl_seconds * | integer | Proposed TTL in seconds (10–86400) |
reasoning * | string | Why the change is being proposed (≥20 chars) |
tool_name * | string | Tool whose TTL is being changed |
instanceId | string | Connection ID; defaults to the active instance |
cache_propose_invalidate
Propose a cache invalidation for review. Filter shape depends on cache type: semantic_cache requires filter_kind=valkey_search + filter_expression; agent_cache requires filter_kind in (tool|key_prefix|session) + filter_value. Warns when estimated_affected exceeds 10000.
| Parameter | Type | Description |
|---|---|---|
cache_name * | string | Name of the cache to invalidate |
estimated_affected * | integer | Caller-estimated number of affected entries |
filter_kind * | string | Discriminator: valkey_search for semantic_cache; tool|key_prefix|session for agent_cache |
reasoning * | string | Why the invalidation is being proposed (≥20 chars) |
filter_expression | string | Required when filter_kind=valkey_search; FT.SEARCH filter |
filter_value | string | Required when filter_kind in (tool|key_prefix|session); the matching value |
instanceId | string | Connection ID; defaults to the active instance |
cache_list_pending_proposals
List pending cache proposals for the active instance, newest first. Optionally filter by cache_name.
| Parameter | Type | Description |
|---|---|---|
cache_name | string | Restrict to a single cache |
instanceId | string | Connection ID; defaults to the active instance |
limit | integer | Max proposals to return (default 100, max 200) |
cache_get_proposal
Fetch a single cache proposal by id, including its audit trail.
| Parameter | Type | Description |
|---|---|---|
proposal_id * | string | Proposal id (returned by cache_propose_*) |
cache_approve_proposal
Approve a pending proposal. Synchronously applies the change to Valkey and returns the terminal status (applied|failed). Idempotent: a second call on an already-applied proposal returns the cached result.
| Parameter | Type | Description |
|---|---|---|
proposal_id * | string | Proposal id |
actor | string | Optional actor identity stamped into the audit trail |
cache_reject_proposal
Reject a pending proposal. Optionally records a reason in the audit trail.
| Parameter | Type | Description |
|---|---|---|
proposal_id * | string | Proposal id |
actor | string | Optional actor identity stamped into the audit trail |
reason | string | Optional rejection reason recorded on the audit row |
cache_edit_and_approve_proposal
Edit an existing pending proposal and approve it in one step. Provide exactly one edit field matching the proposal type: new_threshold for threshold_adjust, new_ttl_seconds for tool_ttl_adjust. Invalidate proposals are not editable.
| Parameter | Type | Description |
|---|---|---|
proposal_id * | string | Proposal id |
actor | string | Optional actor identity stamped into the audit trail |
new_threshold | number | For threshold_adjust proposals |
new_ttl_seconds | integer | For tool_ttl_adjust proposals |
stop_monitor
Stop a persistent BetterDB monitor process that was previously started with start_monitor or --autostart --persist.
memory_stores
List agent-memory stores discovered on an instance (name, capabilities, stats key).
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
memory_list
List memories in a store, newest first, with optional scope and tag filters.
| Parameter | Type | Description |
|---|---|---|
memory_name * | string | The memory store name (from memory_stores) |
agentId | string | Filter by agent ID |
instanceId | string | Optional instance ID override |
limit | integer | Max results (default 20) |
namespace | string | Filter by namespace |
offset | integer | Pagination offset |
tags | array | Filter by tags (AND) |
threadId | string | Filter by thread ID |
memory_get
Fetch a single memory by ID from a store.
| Parameter | Type | Description |
|---|---|---|
id * | string | The memory ID |
memory_name * | string | The memory store name (from memory_stores) |
instanceId | string | Optional instance ID override |
memory_stats
Get item count, eviction count, and live config for a memory store.
| Parameter | Type | Description |
|---|---|---|
memory_name * | string | The memory store name (from memory_stores) |
instanceId | string | Optional instance ID override |
memory_recall
Recall memories from a store by a precomputed query vector (the caller supplies the embedding).
| Parameter | Type | Description |
|---|---|---|
memory_name * | string | The memory store name (from memory_stores) |
vector * | array | Precomputed query embedding |
agentId | string | Filter by agent ID |
instanceId | string | Optional instance ID override |
k | integer | Max results |
namespace | string | Filter by namespace |
tags | array | Filter by tags (AND) |
threadId | string | Filter by thread ID |
threshold | number | Max cosine distance |
memory_forget
Propose forgetting memories (by id, or by scope/tags). Creates a pending proposal that a human must approve before anything is deleted.
| Parameter | Type | Description |
|---|---|---|
memory_name * | string | The memory store name (from memory_stores) |
reasoning * | string | Why these memories should be forgotten (min 20 chars) |
agentId | string | Scope: agent id |
id | string | Forget a single memory by id |
instanceId | string | Optional instance ID override |
namespace | string | Scope: namespace |
tags | array | Scope: forget memories carrying all these tags |
threadId | string | Scope: thread id |
memory_list_pending_forgets
List pending forget proposals awaiting approval on an instance.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
limit | integer | Max results (default 50) |
memory_name | string | Filter by memory store name |
memory_approve_forget
Approve a pending forget proposal, applying the deletion against the live store.
| Parameter | Type | Description |
|---|---|---|
proposal_id * | string | The proposal id (from memory_forget or memory_list_pending_forgets) |
actor | string | Who is approving (recorded in the audit log) |
instanceId | string | Optional instance ID override |
memory_reject_forget
Reject a pending forget proposal without deleting anything.
| Parameter | Type | Description |
|---|---|---|
proposal_id * | string | The proposal id |
actor | string | Who is rejecting (recorded in the audit log) |
instanceId | string | Optional instance ID override |
reason | string | Why the proposal is being rejected |
ai_list_instances
List AI component instances (semantic caches, agent caches, agent memory stores, retrieval pipelines) auto-discovered on the connected Valkey/Redis instance, with liveness and the latest stored metrics sample. This is the superset discovery view across all AI components — use cache_list for cache-specific live stats and memory_stores for memory-store details. Use the returned instance field value as the field parameter of ai_instance_history.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
ai_instance_history
Get the stored metrics time-series for one AI component instance (hits, misses, hit rate, cost saved, evictions, item count, index size, threshold). Use ai_list_instances first to find the instance field identifier. Use this to see trends: hit-rate degradation, growth, threshold drift.
| Parameter | Type | Description |
|---|---|---|
field * | string | Instance field identifier from ai_list_instances |
hours | integer | Look-back window in whole hours, 1-168 (default 24) |
instanceId | string | Optional instance ID override |
list_ai_traces
List recent AI application traces ingested via OpenTelemetry (LLM calls, cache lookups, memory recalls, retrieval spans). Not tied to a Valkey instance — traces come from instrumented AI apps. Use get_ai_trace for a full span waterfall and correlate_ai_trace to join a trace with live Valkey state.
| Parameter | Type | Description |
|---|---|---|
hours | integer | Look-back window in whole hours, 1-168 (default 1) |
limit | integer | Max traces to return, 1-1000 (default 100) |
service | string | Filter by emitting service name |
get_ai_trace
Get the full span waterfall for one AI trace: every span with timing, parent relationships, and attributes (model, cache hit/miss, similarity scores). Use list_ai_traces to find trace IDs.
| Parameter | Type | Description |
|---|---|---|
traceId * | string | Trace ID from list_ai_traces |
correlate_ai_trace
Explain WHY a trace behaved the way it did by joining its cache/memory spans with live Valkey state: does the key still exist, what is its TTL, what threshold was active, what is the index state. The strongest tool for diagnosing unexpected cache misses or stale memory recalls. Requires a selected instance (the one the AI components run on).
| Parameter | Type | Description |
|---|---|---|
traceId * | string | Trace ID from list_ai_traces |
instanceId | string | Optional instance ID override |
get_forecast
Get a capacity forecast for one metric: current trajectory and projected time until the resource ceiling is hit. Metric kinds: opsPerSec, usedMemory, cpuTotal, memFragmentation. Use for capacity planning ("when does memory run out at current growth?").
| Parameter | Type | Description |
|---|---|---|
metricKind * | string | Metric to forecast |
instanceId | string | Optional instance ID override |
get_latency_regressions
Get detected latency regressions (sustained p99 command-latency degradations vs baseline) from persisted storage. Companion to get_anomalies: same event store, pre-filtered to latency regressions. Use when investigating "the database got slower".
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
limit | number | Max events to return (default 100) |
startTime | number | Start time (Unix timestamp ms, default 24h ago) |
get_incident_timeline
Get anomaly incidents as ordered timelines. Anomalies on one instance or topology that follow each other closely are grouped into one incident, in the order they happened, with any matched multi-step sequence pattern and a recovery status (active, recovering, recovered, degraded when signals stay open long after the incident went quiet, or unknown when recovery can no longer be measured, with those metrics in recovery.unknownSignals). An entry that is about one cluster node names it in `node` (`nodeId`, `address`, `role`, plus `shardId` and `availabilityZone` when known, and `collected`: false…
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
limit | number | Max incidents to return, newest first (default 20) |
startTime | number | Start time (Unix timestamp ms, default 24h ago) |
get_replication_divergence
Get replication divergence for a primary: the per-replica offset gap series (bytes behind as the primary sees it, write rate, seconds behind, `replicaGapBytes` as the replica reports it with `replicaView` saying whether it could be read (`ok`, `unreachable`, `replid_mismatch`, `not_replica`, or null when it was not sampled), live alert level, `behind` when it lags under the alert thresholds or has an event left open by a restart, or `unobserved` when the replica is not connected) and the divergence events from the anomaly store; `eventsUnavailable: true` means the events could not be read, not…
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
limit | number | Max divergence events to return (default 100) |
startTime | number | Start time (Unix timestamp ms; default 1h ago for the gap series, 24h ago for events) |
get_largest_keys
Get the largest keys from key analytics snapshots, ranked by measured memory usage. Coverage note: snapshots track the biggest collections by element count, so a memory-heavy key with few elements may not be tracked. Companion to get_hot_keys, which ranks by access frequency. Use to find memory hogs, bloated hashes/sets, or candidates for TTL/eviction. Requires BetterDB Pro (keyAnalytics).
| Parameter | Type | Description |
|---|---|---|
endTime | number | End time (Unix timestamp ms) |
instanceId | string | Optional instance ID override |
limit | number | Max keys to return (default 50) |
startTime | number | Start time (Unix timestamp ms) |
get_vector_indexes
Get health details for every vector search index on the instance: document count, memory usage, indexing failures, and percent indexed. Requires the Search module (valkey-search / RediSearch) on the connection — errors clearly if absent. Use to diagnose incomplete indexing or index memory growth.
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
get_inference_latency
Get the FT.SEARCH latency profile: p50/p95/p99 per vector index over the sampling window, plus SLA breach status per index. sla is null when BetterDB Pro inference SLA monitoring is absent or unlicensed, and an empty array when it is active with no indexes configured. More specific than get_latency, which covers general command latency. Use to answer "are vector searches meeting their latency budget?".
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Optional instance ID override |
windowMs | integer | Profile window in whole milliseconds, minimum 1000 (service default if omitted) |