Skip to content

Add Exa search performance defaults injection for MCP tools#2176

Open
gary149 wants to merge 1 commit intomainfrom
claude/exa-search-performance-7vufi
Open

Add Exa search performance defaults injection for MCP tools#2176
gary149 wants to merge 1 commit intomainfrom
claude/exa-search-performance-7vufi

Conversation

@gary149
Copy link
Collaborator

@gary149 gary149 commented Mar 12, 2026

Summary

This PR adds support for injecting default Exa search parameters into MCP tool invocations, allowing configuration of search type and livecrawl behavior at the application level while respecting LLM-provided overrides.

Key Changes

  • Added configuration options EXA_SEARCH_TYPE and EXA_LIVECRAWL to control Exa search defaults
  • Implemented automatic parameter injection in executeToolCalls() that:
    • Detects when an Exa MCP server is being invoked
    • Injects configured defaults for type and livecrawl parameters
    • Only applies defaults when the LLM hasn't explicitly set these parameters
  • Updated environment configuration with new Exa-specific settings (defaults: fast for search type, never for livecrawl)

Implementation Details

  • The injection logic checks isExaMcpServer() to identify Exa MCP servers by URL
  • Parameters are only set if they're undefined in the tool arguments, preserving any LLM-specified values
  • Configuration values can be left empty to disable the override behavior
  • Changes are minimal and focused, adding the feature without modifying existing tool execution flow

https://claude.ai/code/session_01ULoVUMgYs2EcmPBWAN8fYg

Adds EXA_SEARCH_TYPE and EXA_LIVECRAWL env vars that are injected as
default arguments into Exa MCP tool calls. Defaults to type="fast"
(30% faster) and livecrawl="never" (cached content). LLM-provided
values are not overridden.

https://claude.ai/code/session_01ULoVUMgYs2EcmPBWAN8fYg
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.

2 participants