Skip to content

Disable file search by default#311

Merged
locnguyen1986 merged 2 commits intoreleasefrom
main
Dec 17, 2025
Merged

Disable file search by default#311
locnguyen1986 merged 2 commits intoreleasefrom
main

Conversation

@locnguyen1986
Copy link
Collaborator

Disable file search by default

Copilot AI review requested due to automatic review settings December 17, 2025 04:20
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 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 EnableFileSearch configuration field with default value of false
  • 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"`
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@locnguyen1986 locnguyen1986 merged commit aa5d6f5 into release Dec 17, 2025
13 of 14 checks passed
@github-project-automation github-project-automation bot moved this to QA in Jan Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: QA

Development

Successfully merging this pull request may close these issues.

3 participants