Skip to main content
Glama
redis

Redis MCP Server

Official
by redis

info

Retrieve Redis server information and statistics by specifying sections such as memory or CPU. Analyze performance metrics and monitor server health efficiently.

Instructions

Get Redis server information and statistics.

Args: section: The section of the info command (default, memory, cpu, etc.).

Returns: A dictionary of server information or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionNodefault

Implementation Reference

  • The handler function for the "info" MCP tool. It retrieves Redis server information and statistics for a specified section using the Redis client's info method, with error handling for RedisErrors.
    @mcp.tool() async def info(section: str = "default") -> dict: """Get Redis server information and statistics. Args: section: The section of the info command (default, memory, cpu, etc.). Returns: A dictionary of server information or an error message. """ try: r = RedisConnectionManager.get_connection() info = r.info(section) return info except RedisError as e: return f"Error retrieving Redis info: {str(e)}"
  • Input/output schema for the "info" tool defined by the function signature (section: str = "default" → dict) and comprehensive docstring describing parameters and return types.
    async def info(section: str = "default") -> dict: """Get Redis server information and statistics. Args: section: The section of the info command (default, memory, cpu, etc.). Returns: A dictionary of server information or an error message. """
  • The @mcp.tool() decorator registers the info function as an MCP tool.
    @mcp.tool()

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

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