Get Redis cache stats
get_redis_cache_statsValidate a Redis FDW server and return best-effort cache metrics—key count, memory usage, and availability—with a diagnostic when uniform stats are unsupported.
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')
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": {
"server": "<server>"
},
"name": "get_redis_cache_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | Yes | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| server | Yes | ||
| available | Yes | ||
| key_count | Yes | ||
| used_memory_bytes | Yes |