Conversation
Disable file search by default
There was a problem hiding this comment.
Pull request overview
This pull request introduces a feature flag to disable file search functionality by default in the MCP tools service. The change adds a new configuration option MCP_ENABLE_FILE_SEARCH that controls whether the file_search_index and file_search_query MCP tools are registered and available for use.
Key Changes:
- Added
EnableFileSearchconfiguration field with default value offalse - Wrapped file search tool registration in a conditional block based on the new flag
- Added warning log when file search tools are disabled
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| services/mcp-tools/internal/infrastructure/config/config.go | Added EnableFileSearch boolean field with MCP_ENABLE_FILE_SEARCH environment variable (default: false) |
| .env.template | Added MCP_ENABLE_FILE_SEARCH=false to environment template |
| services/mcp-tools/main.go | Passed EnableFileSearch configuration to SerperMCP initialization |
| services/mcp-tools/internal/interfaces/httpserver/routes/mcp/serper_mcp.go | Added enableFileSearch field to SerperMCP struct and config, implemented conditional tool registration with warning log when disabled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| SandboxFusionRequireApproval bool `env:"MCP_SANDBOX_REQUIRE_APPROVAL" envDefault:"false"` | ||
| EnablePythonExec bool `env:"MCP_ENABLE_PYTHON_EXEC" envDefault:"true"` | ||
| EnableMemoryRetrieve bool `env:"MCP_ENABLE_MEMORY_RETRIEVE" envDefault:"true"` | ||
| EnableFileSearch bool `env:"MCP_ENABLE_FILE_SEARCH" envDefault:"false"` |
There was a problem hiding this comment.
The new MCP_ENABLE_FILE_SEARCH environment variable should be documented in the README.md file under the External Services section, similar to how MCP_ENABLE_PYTHON_EXEC and MCP_ENABLE_MEMORY_RETRIEVE are documented at lines 168-169. This will help users understand how to configure this feature.
Disable file search by default