Skip to main content
Glama

Redis MCP Server

Official
by redis

scan_all_keys

Scan and retrieve all keys matching a specified pattern in Redis using multiple SCAN iterations. Safely handles large datasets by avoiding KEYS * but may consume significant memory for extensive databases.

Instructions

Scan and return ALL keys matching a pattern using multiple SCAN iterations.

This function automatically handles the SCAN cursor iteration to collect all matching keys. It's safer than KEYS * for large databases but will still collect all results in memory.

⚠️ WARNING: With very large datasets (millions of keys), this may consume significant memory. For large-scale operations, consider using scan_keys() with manual iteration instead.

Args: pattern: Pattern to match keys against (default is "*" for all keys). batch_size: Number of keys to scan per iteration (default 100).

Returns: A list of all keys matching the pattern or an error message.

Input Schema

NameRequiredDescriptionDefault
batch_sizeNo
patternNo*

Input Schema (JSON Schema)

{ "properties": { "batch_size": { "default": 100, "title": "Batch Size", "type": "integer" }, "pattern": { "default": "*", "title": "Pattern", "type": "string" } }, "title": "scan_all_keysArguments", "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/redis/mcp-redis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server