Skip to main content
Glama
Redis MCP Server

Redis MCP Server

by minivv

redis_query

Executes read-only Redis commands like GET, HGETALL, LRANGE, SMEMBERS, SCAN, and INFO. Rejects write commands with a prompt to use redis_execute, and truncates results by limit.

Instructions

执行只读 Redis 命令(GET / HGETALL / LRANGE / SMEMBERS / SCAN / INFO 等)。服务端按命令本身判定是否只读,写命令会被拒绝并提示改用 redis_execute。结果按 limit 截断。返回包含 connection / env / envLabel / readOnly / allowedOps / count / truncated / result。

Input Schema

NameRequiredDescriptionDefault
limitNo返回条目上限,默认 200,最大 2000
commandYesRedis 命令,如 'GET user:1'、'HGETALL session:abc'、'SCAN 0 MATCH user:* COUNT 100'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses read-only enforcement, rejection behavior for writes, limit-based truncation, and the full return envelope (connection/env/envLabel/readOnly/allowedOps/count/truncated/result). It stops short of describing authentication, connection selection, or rate-limit behavior, which is the only gap.

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?

Three short sentences: the first states scope with examples, the second addresses write rejection and the fallback tool, and the third covers truncation and the return shape. Nothing is redundant and the most important routing rule is front-loaded.

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?

The description is largely sufficient because, despite having no output schema, it enumerates the fields in the return value and explains limit truncation. The one unresolved point is how the connection or env is selected, because there is no corresponding input parameter, though redis_context may supply this.

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 coverage is already 100%, so the baseline is 3. The description adds genuine value by stating that results are truncated according to limit, which clarifies limit's runtime effect beyond its schema text ('default 200, max 2000'), and the command examples reinforce the command parameter's expected syntax.

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 uses a specific verb and resource ('执行只读 Redis 命令') and lists allowed command families (GET/HGETALL/LRANGE/SMEMBERS/SCAN/INFO), so it is indistinguishable from the sibling redis_execute only by its read-only scope, which it explicitly states.

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?

It states the server rejects write commands and directs the agent to use redis_execute instead, which is an explicit when-not rule and a named alternative. This is exactly the routing guidance an agent needs when choosing between the two siblings.

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

Deploy Server

Other Tools