Skip to main content
Glama
redis

Redis MCP Server

Official
by redis

get_index_info

Retrieve schema and configuration details for a specific Redis index using FT.INFO command to understand its structure and properties.

Instructions

Retrieve schema and information about a specific Redis index using FT.INFO.

Args: index_name (str): The name of the index to retrieve information about.

Returns: str: Information about the specified index or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
index_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_index_info' tool, decorated with @mcp.tool() for registration. It retrieves detailed information about a Redis search index using FT.INFO and returns it as a formatted JSON string, handling Redis errors gracefully.
    @mcp.tool()
    async def get_index_info(index_name: str) -> str:
        """Retrieve schema and information about a specific Redis index using FT.INFO.
    
        Args:
            index_name (str): The name of the index to retrieve information about.
    
        Returns:
            str: Information about the specified index or an error message.
        """
        try:
            r = RedisConnectionManager.get_connection()
            info = r.ft(index_name).info()
            return json.dumps(info, ensure_ascii=False, indent=2)
        except RedisError as e:
            return f"Error retrieving index info: {str(e)}"
Behavior3/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. It discloses that the tool retrieves information (implying read-only behavior) and mentions potential error messages, which adds some behavioral context. However, it lacks details on permissions, rate limits, or what specific information is returned (e.g., schema details), leaving gaps in transparency for a tool with no annotation support.

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 well-structured and appropriately sized, with a clear purpose statement followed by Args and Returns sections. Every sentence adds value, such as specifying the FT.INFO method and error handling. It could be slightly more concise by integrating the sections more seamlessly, but it's efficiently front-loaded with key information.

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?

Given the tool's low complexity (one parameter), no annotations, and the presence of an output schema (which handles return values), the description is reasonably complete. It covers the purpose, parameter semantics, and basic behavior. However, it could improve by adding more context on error conditions or usage relative to siblings, which holds it back from a score of 5.

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 description adds significant meaning beyond the input schema, which has 0% coverage. It explains that 'index_name' is 'The name of the index to retrieve information about,' clarifying the parameter's purpose. With only one parameter and no schema descriptions, this compensation is effective, though it doesn't detail format constraints (e.g., naming rules).

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: 'Retrieve schema and information about a specific Redis index using FT.INFO.' It specifies the verb ('retrieve'), resource ('Redis index'), and method ('FT.INFO'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from siblings like 'get_indexes' or 'info', which would be needed for a score of 5.

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. It doesn't mention siblings like 'get_indexes' (which might list indexes) or 'info' (which could provide general Redis info), leaving the agent to infer usage context. This lack of explicit when/when-not or alternative references results in minimal guidance.

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