Skip to main content
Glama
redis

Redis MCP Server

Official
by redis

get_indexes

Retrieve a list of all indexes in your Redis database to manage and search data efficiently. Returns results in JSON format.

Instructions

List of indexes in the Redis database

Returns: str: A JSON string containing the list of indexes or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the get_indexes tool. It lists all indexes in the Redis database using FT._LIST command and returns them as JSON string or error message if fails.
    @mcp.tool() async def get_indexes() -> str: """List of indexes in the Redis database Returns: str: A JSON string containing the list of indexes or an error message. """ try: r = RedisConnectionManager.get_connection() return json.dumps(r.execute_command("FT._LIST")) except RedisError as e: return f"Error retrieving indexes: {str(e)}"
  • The @mcp.tool() decorator registers the get_indexes 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