Skip to main content
Glama
Yuchenhui

Redis MCP Server

by Yuchenhui

scan_all_keys

Retrieve all keys matching a pattern by automatically iterating SCAN commands, providing a safer alternative to KEYS * for large 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

TableJSON Schema
NameRequiredDescriptionDefault
patternNo*
batch_sizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It explains automatic cursor iteration, in-memory collection, memory warning, and return type. However, it does not explicitly state the tool is read-only (non-destructive), which would be ideal for full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise without fluff, front-loaded with main purpose, and includes a warning block for emphasis. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a potentially memory-intensive tool, description covers operation, memory warning, alternatives, parameters, and return type. Minor gap: does not specify error conditions beyond 'error message'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but description adds meaning by explaining pattern is for matching keys and batch_size controls iteration count. However, it does not provide constraints, examples, or format details beyond defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Scan and return' and the resource 'ALL keys matching a pattern', distinguishing it from sibling 'scan_keys' which requires manual iteration. It also notes it's safer than KEYS * for large databases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (safer than KEYS *) and when not to use (very large datasets with memory concerns), and suggests an alternative: scan_keys() with manual iteration.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/Yuchenhui/mcp-redis'

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