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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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()
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the return format ('JSON string') and error handling, but lacks details on permissions, rate limits, side effects, or what 'list of indexes' entails (e.g., format, pagination). This is inadequate for a tool with zero annotation coverage.

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 efficiently structured in two sentences: one stating the purpose and one detailing the return. It's front-loaded with the core function, though the 'Returns:' label is slightly redundant. Overall, it's concise with minimal waste.

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 tool's low complexity (0 parameters) and the presence of an output schema (which should document return values), the description is minimally adequate. It covers the basic purpose and return format, but lacks behavioral context needed due to missing annotations, making it incomplete for safe agent use.

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?

The tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to explain parameters, so it appropriately focuses on output. A baseline of 4 is given since no parameter information is required, and the description adds value by specifying the return type.

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 clearly states the tool's purpose with a specific verb ('List') and resource ('indexes in the Redis database'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_index_info' or 'get_indexed_keys_number', which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_index_info' (likely for detailed index metadata) and 'get_indexed_keys_number' (likely for count information), there's no indication of context, prerequisites, or exclusions for selecting this tool.

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

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