Skip to main content
Glama
redis

Redis MCP Server

Official
by redis

search_redis_documents

Search Redis documentation to understand concepts like caching, session management, rate limiting, semantic search, RAG, and real-time analytics for AI applications.

Instructions

Search Redis documentation and knowledge base to learn about Redis concepts and use cases.

This tool exposes updated and curated documentation, and must be invoked every time the user wants to learn more in areas including:

Common Use Cases:

  • Session Management: User session storage and management

  • Caching: Application-level and database query caching

  • Rate Limiting: API throttling and request limiting

  • Leaderboards: Gaming and ranking systems

  • Semantic Search: AI-powered similarity search

  • Agentic Workflows: AI agent state and memory management

  • RAG (Retrieval-Augmented Generation): Vector storage for AI applications

  • Real-time Analytics: Counters, metrics, and time-series data

  • Message Queues: Task queues and job processing

  • Geospatial: Location-based queries and proximity search

Args: question: The question about Redis concepts, data structures, features, or use cases

Returns: Union[List[Dict[str, Any]], Dict[str, Any]]: A list of documentation results from the API, or a dict with an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler implementation for the 'search_redis_documents' tool. Decorated with @mcp.tool() for automatic registration. Performs an HTTP GET request to the configured MCP_DOCS_SEARCH_URL with the question as query parameter 'q', parses JSON response or handles errors appropriately.
    @mcp.tool()
    async def search_redis_documents(
        question: str,
    ) -> Union[List[Dict[str, Any]], Dict[str, Any]]:
        """Search Redis documentation and knowledge base to learn about Redis concepts and use cases.
    
        This tool exposes updated and curated documentation, and must be invoked every time the user wants to learn more in areas including:
    
        **Common Use Cases:**
        - Session Management: User session storage and management
        - Caching: Application-level and database query caching
        - Rate Limiting: API throttling and request limiting
        - Leaderboards: Gaming and ranking systems
        - Semantic Search: AI-powered similarity search
        - Agentic Workflows: AI agent state and memory management
        - RAG (Retrieval-Augmented Generation): Vector storage for AI applications
        - Real-time Analytics: Counters, metrics, and time-series data
        - Message Queues: Task queues and job processing
        - Geospatial: Location-based queries and proximity search
    
        Args:
            question: The question about Redis concepts, data structures, features, or use cases
    
        Returns:
            Union[List[Dict[str, Any]], Dict[str, Any]]: A list of documentation results from the API, or a dict with an error message.
        """
        if not MCP_DOCS_SEARCH_URL:
            return {"error": "MCP_DOCS_SEARCH_URL environment variable is not configured"}
    
        if not question.strip():
            return {"error": "Question parameter cannot be empty"}
    
        try:
            headers = {
                "Accept": "application/json",
                "User-Agent": f"Redis-MCP-Server/{__version__}",
            }
            async with aiohttp.ClientSession() as session:
                async with session.get(
                    url=MCP_DOCS_SEARCH_URL, params={"q": question}, headers=headers
                ) as response:
                    # Try to parse JSON response
                    try:
                        result = await response.json()
                        return result
                    except aiohttp.ContentTypeError:
                        # If not JSON, return text content
                        text_content = await response.text()
                        return {"error": f"Non-JSON response: {text_content}"}
    
        except aiohttp.ClientError as e:
            return {"error": f"HTTP client error: {str(e)}"}
        except Exception as e:
            return {"error": f"Unexpected error calling ConvAI API: {str(e)}"}
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes that the tool provides 'updated and curated documentation' and explains what type of content it searches (concepts, data structures, features, use cases). However, it doesn't mention limitations like rate limits, authentication requirements, or potential response formats beyond the basic return statement. The description doesn't contradict any annotations since none exist.

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 with clear sections: purpose statement, invocation guidance, use cases list, and parameter/return documentation. The use cases list is comprehensive but could be more concise. Every sentence serves a purpose, though the bulleted list of use cases is quite extensive for a documentation search tool.

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

Completeness5/5

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

Given the tool's complexity (educational/documentation search), the description provides complete context. It explains what the tool does, when to use it, what content it searches, and includes parameter semantics. With an output schema present, the description doesn't need to explain return values in detail. The combination of purpose, guidelines, and parameter explanation makes this description complete for its function.

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 input schema has 0% description coverage, so the description must compensate. It provides a clear explanation of the 'question' parameter: 'The question about Redis concepts, data structures, features, or use cases.' This gives meaningful semantic context beyond the schema's basic type information. However, it doesn't provide examples or guidance on question formatting, which would elevate it to a 5.

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

Purpose5/5

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

The description explicitly states the tool's purpose as searching Redis documentation and knowledge base to learn about Redis concepts and use cases. It clearly distinguishes this from all sibling tools, which are direct Redis operations (like get, set, delete) rather than documentation search tools. The verb 'search' is specific and the resource 'Redis documentation and knowledge base' is well-defined.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'must be invoked every time the user wants to learn more' about Redis concepts. It also lists specific areas where it should be used through the 'Common Use Cases' section, giving clear context for appropriate invocation. The tool is clearly differentiated from all sibling tools which perform operational Redis commands rather than educational searches.

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