Skip to content

Conversation

@vchomakov
Copy link
Member

@vchomakov vchomakov commented Nov 19, 2025

Description

Adds a new search_documents tool that enables querying Redis documentation through natural language. This tool integrates with the Redis documentation API to provide contextual answers about Redis concepts, data structures, features, and use cases.

It also documents the new tool and its MCP_DOCS_SEARCH_URL configuration in the README, and adds unit tests to cover both successful and error scenarios.

Changes

  • Added search_documents tool in src/tools/misc.py
  • Added aiohttp dependency for HTTP API requests
  • Updated server dependencies list to include aiohttp
  • Updated integration tests to include the new tool
  • Added comprehensive docstring with usage examples
  • Documented the docs search tool and MCP_DOCS_SEARCH_URL configuration in README.md
  • Added unit tests for search_documents in tests/tools/test_misc.py

Features

The search_documents tool supports queries about:

  • Redis data structures (strings, hashes, lists, sets, sorted sets, streams, JSON)
  • Caching strategies and patterns
  • Vector search and semantic similarity
  • Pub/sub messaging
  • Session management
  • Rate limiting
  • Leaderboards and ranking systems
  • Real-time analytics
  • Geospatial queries

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new search_documents tool that enables natural language queries against Redis documentation through an HTTP API. The implementation includes comprehensive error handling, input validation, unit tests covering both success and error scenarios, and updates to documentation and integration tests to reflect the new capability.

Key Changes:

  • New search_documents async tool with comprehensive docstring describing Redis data structures and use cases
  • Added aiohttp>=3.13.0 dependency for HTTP requests
  • Configuration support via MCP_DOCS_SEARCH_URL environment variable with sensible default
  • Unit tests covering URL configuration, empty input, JSON/non-JSON responses, and HTTP errors

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tools/misc.py Implements the new search_documents tool with error handling and HTTP API integration
src/common/config.py Adds MCP_DOCS_SEARCH_URL configuration with default value
src/common/server.py Updates FastMCP dependencies list to include aiohttp
tests/tools/test_misc.py Adds comprehensive unit tests for the new tool covering success and error cases
tests/test_server.py Updates dependency assertions to include aiohttp
tests/test_integration.py Updates tool count and tool list to include search_documents
pyproject.toml Adds aiohttp>=3.13.0 as a project dependency
uv.lock Lock file updates for aiohttp and its transitive dependencies
README.md Documents the new docs search tool and MCP_DOCS_SEARCH_URL configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@redis redis deleted a comment from Copilot AI Nov 21, 2025
Copy link
Member

@bobymicroby bobymicroby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@tishun tishun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

I assume the prompts are also verified by @mortensi so I won't comment on them

@vchomakov vchomakov merged commit 1f35871 into main Nov 25, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants