Get Redis cache stats
get_redis_cache_statsRetrieve best-effort cache metrics for a Redis foreign data wrapper server, reporting key count, memory usage, and availability status.
Instructions
Best-effort cache metrics for a redis_fdw server. redis_fdw does not ship a uniform stats SQL surface across versions, so the tool validates that the server exists and otherwise reports available=false with a diagnostic. Operators wanting live metrics should query Redis directly (INFO / DBSIZE). Returns an object with server, available (bool), key_count, used_memory_bytes, and detail (a human-readable note).
Example: get_redis_cache_stats(server='redis_primary')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | Yes | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| server | Yes | ||
| available | Yes | ||
| key_count | Yes | ||
| used_memory_bytes | Yes |