redis_get
Read any Redis key by auto-detecting its type, returning strings, hashes, lists, sets, or sorted sets. Collection reads are capped by limit, always read-only.
Instructions
Read a key's value, dispatching by type so you get the right shape without knowing the type in advance: string -> the value (byte-windowed at REDIS_MAX_VALUE_BYTES, default 256 KiB, with truncated + full length when capped); hash -> field/value object; list -> array (LRANGE windowed by limit); set -> member array; zset -> [member, score] pairs (ZRANGE WITHSCORES, windowed); stream -> recent entries (XREVRANGE, windowed). Collection reads are capped at limit (default REDIS_MAX_KEYS) so a million-element list can't blow out context. Always read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The key to read. | |
| limit | No | Max elements to return for collection types (default REDIS_MAX_KEYS=1000). |