-
Notifications
You must be signed in to change notification settings - Fork 79
feat: add search_documents tool for Redis documentation queries #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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_documentsasync tool with comprehensive docstring describing Redis data structures and use cases - Added
aiohttp>=3.13.0dependency for HTTP requests - Configuration support via
MCP_DOCS_SEARCH_URLenvironment 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.
bobymicroby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tishun
left a comment
There was a problem hiding this 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
Description
Adds a new
search_documentstool 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_URLconfiguration in theREADME, and adds unit tests to cover both successful and error scenarios.Changes
search_documentstool insrc/tools/misc.pyaiohttpdependency for HTTP API requestsaiohttpMCP_DOCS_SEARCH_URLconfiguration in README.mdtests/tools/test_misc.pyFeatures
The
search_documentstool supports queries about: