Skip to main content
Glama
lm203688

redis-mcp-server

by lm203688

server_info

Retrieve detailed Redis server information, including memory, stats, and clients. Specify a section for targeted data or get all without parameters.

Instructions

获取Redis服务器信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionNo信息分区(server/clients/memory/persistence/stats/replication/cpu/keyspace),不填则返回全部

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'server_info' tool. It is decorated with @mcp.tool(), takes an optional section parameter, calls db.info(section) to get Redis server information, and returns the result as a JSON string.
    @mcp.tool()
    def server_info(section: Optional[str] = None) -> str:
        """获取Redis服务器信息
    
        Args:
            section: 信息分区(server/clients/memory/persistence/stats/replication/cpu/keyspace),不填则返回全部
        """
        try:
            result = db.info(section)
            return json.dumps(result, ensure_ascii=False, indent=2, default=str)
        except Exception as e:
            return json.dumps({"error": str(e)}, ensure_ascii=False)
  • The @mcp.tool() decorator registers 'server_info' as an MCP tool on the FastMCP instance.
    @mcp.tool()
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It does not state that this is a read-only operation, nor does it mention potential performance impact or any side effects. The parameter description in the schema provides some detail, but the tool description itself lacks behavioral transparency.

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

Conciseness4/5

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

The description is a single concise phrase with no superfluous words. It is front-loaded with the core purpose. It could be slightly more structured but is appropriately sized.

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

Completeness3/5

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

Given the presence of an output schema (indicated by flag), the description does not need to detail return values. However, the description is minimal and does not mention that the tool is safe or that it provides comprehensive info. It is adequate but lacks additional context that could aid an agent.

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 coverage for the single parameter 'section' is 100%, with a description in Chinese enumerating valid values. The tool description adds no extra meaning beyond what the schema already provides. Per guidelines, baseline 3 is appropriate when schema coverage is high.

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

Purpose4/5

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

The description '获取Redis服务器信息' clearly states the tool retrieves Redis server information. The verb '获取' (get) and resource 'Redis服务器信息' (Redis server info) make the purpose obvious. It distinguishes from siblings like db_size or get_hash by being a general info call.

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?

No explicit when-to-use or when-not-to-use guidance is provided. The tool's purpose is implied as the general server info retrieval tool among siblings, but the description does not specify when to prefer it over other tools or mention any usage context.

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

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