Skip to main content
Glama

redis_big_keys

Read-only

Samples largest Redis keys by memory usage using a budgeted SCAN, reporting partial coverage to diagnose memory pressure without blocking production.

Instructions

[READ] SCAN-budgeted big-key sample — largest sampled keys first.

Walks at most 10,000 keys with SCAN and sizes at most 200 of them with MEMORY USAGE (never KEYS *), so it is safe on a production instance; coveragePct reports how partial the sample is.

Args: top: How many key rows to return, largest first (default 20). target: redis target name from config; omit for the default.

Returns an envelope: {"topKeys": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more than was returned — do not treat this as the complete set.

Input Schema

NameRequiredDescriptionDefault
topNo
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint, while the description adds critical behavioral detail: SCAN walks at most 10,000 keys, MEMORY USAGE sizes at most 200, coveragePct reports partiality, and truncated=true means the result is incomplete. This is rich, safety-relevant disclosure that goes well beyond the annotation.

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 front-loaded with the key summary, then method and safety, then Args and Returns. Every sentence earns its place, and the return envelope is documented because no output schema exists. It is appropriately sized for a tool with non-obvious sampling behavior.

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

Completeness5/5

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

Given the sampling complexity, 0% schema coverage, and no output schema, the description is complete: it explains the sampling budget, safety, both parameters, and the exact return envelope including the truncated warning. An agent has everything needed to call it correctly and interpret partial results.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It explains both parameters: 'top' controls how many key rows to return, largest first (default 20), and 'target' is a redis target name from config, omitted for the default. This covers the two optional parameters adequately, though it does not elaborate on target value formats or error behavior.

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?

States a specific verb and resource: 'SCAN-budgeted big-key sample — largest sampled keys first.' It clearly distinguishes from generic keyspace tools by naming the big-key sampling goal and the safety mechanism (never KEYS *). An agent can identify this as the tool for finding large keys.

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

Usage Guidelines3/5

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

Implies usage by explaining the sampling method and production safety, but does not explicitly say when to use this versus siblings like redis_keyspace or redis_memory_stats. It gives useful context about safety, yet no when-not or alternative routing is provided.

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