diff --git a/packages/coding-agent/src/core/tools/exa/company.ts b/packages/coding-agent/src/core/tools/exa/company.ts index 433541cb5..881f6e6fb 100644 --- a/packages/coding-agent/src/core/tools/exa/company.ts +++ b/packages/coding-agent/src/core/tools/exa/company.ts @@ -34,7 +34,7 @@ Parameters: details: { error: "EXA_API_KEY not found", toolName: "exa_company" }, }; } - const response = await callExaTool("company_research_exa", params, apiKey); + const response = await callExaTool("company_research", params, apiKey); if (isSearchResponse(response)) { const formatted = formatSearchResults(response); diff --git a/packages/coding-agent/src/core/tools/exa/linkedin.ts b/packages/coding-agent/src/core/tools/exa/linkedin.ts index e2ccccd91..02b48d09d 100644 --- a/packages/coding-agent/src/core/tools/exa/linkedin.ts +++ b/packages/coding-agent/src/core/tools/exa/linkedin.ts @@ -34,7 +34,7 @@ Parameters: details: { error: "EXA_API_KEY not found", toolName: "exa_linkedin" }, }; } - const response = await callExaTool("linkedin_search_exa", params, apiKey); + const response = await callExaTool("linkedin_search", params, apiKey); if (isSearchResponse(response)) { const formatted = formatSearchResults(response); diff --git a/packages/coding-agent/src/core/tools/exa/search.ts b/packages/coding-agent/src/core/tools/exa/search.ts index 5087f0ef1..d15ef0912 100644 --- a/packages/coding-agent/src/core/tools/exa/search.ts +++ b/packages/coding-agent/src/core/tools/exa/search.ts @@ -91,7 +91,7 @@ Parameters: details: { error: "EXA_API_KEY not found", toolName: "exa_search" }, }; } - const response = await callExaTool("web_search", params, apiKey); + const response = await callExaTool("web_search_exa", params, apiKey); if (isSearchResponse(response)) { const formatted = formatSearchResults(response); @@ -187,7 +187,8 @@ Similar parameters to exa_search, optimized for research depth.`, details: { error: "EXA_API_KEY not found", toolName: "exa_search_deep" }, }; } - const response = await callExaTool("deep_search_exa", params, apiKey); + const args = { ...params, type: "deep" }; + const response = await callExaTool("web_search_exa", args, apiKey); if (isSearchResponse(response)) { const formatted = formatSearchResults(response); @@ -305,7 +306,7 @@ Parameters: details: { error: "EXA_API_KEY not found", toolName: "exa_crawl" }, }; } - const response = await callExaTool("crawling_exa", params, apiKey); + const response = await callExaTool("crawling", params, apiKey); if (isSearchResponse(response)) { const formatted = formatSearchResults(response); diff --git a/packages/coding-agent/src/core/tools/exa/types.ts b/packages/coding-agent/src/core/tools/exa/types.ts index c92718b5e..1ee91c8fa 100644 --- a/packages/coding-agent/src/core/tools/exa/types.ts +++ b/packages/coding-agent/src/core/tools/exa/types.ts @@ -23,7 +23,7 @@ export interface MCPToolWrapperConfig { name: string; /** Display label for UI */ label: string; - /** MCP tool name to call (e.g., "web_search") */ + /** MCP tool name to call (e.g., "web_search_exa") */ mcpToolName: string; /** Whether this is a websets tool (uses different MCP endpoint) */ isWebsetsTool?: boolean; @@ -121,14 +121,13 @@ export interface WebsetEnrichment { /** Tool name mappings: MCP name -> our tool name */ export const EXA_TOOL_MAPPINGS = { // Search tools - web_search: "exa_search", - deep_search_exa: "exa_search_deep", + web_search_exa: "exa_search", get_code_context_exa: "exa_search_code", - crawling_exa: "exa_crawl", + crawling: "exa_crawl", // LinkedIn - linkedin_search_exa: "exa_linkedin", + linkedin_search: "exa_linkedin", // Company - company_research_exa: "exa_company", + company_research: "exa_company", // Researcher deep_researcher_start: "exa_researcher_start", deep_researcher_check: "exa_researcher_poll", diff --git a/packages/coding-agent/src/core/tools/web-search/index.ts b/packages/coding-agent/src/core/tools/web-search/index.ts index 68fe73e53..375ef39ef 100644 --- a/packages/coding-agent/src/core/tools/web-search/index.ts +++ b/packages/coding-agent/src/core/tools/web-search/index.ts @@ -345,7 +345,9 @@ Parameters: parameters: webSearchDeepSchema, async execute(_toolCallId, params, _onUpdate, _ctx, _signal) { - return executeExaTool("deep_search_exa", params as Record, "web_search_deep"); + const { num_results, ...rest } = params as Record; + const args = { ...rest, type: "deep", numResults: num_results ?? 10 }; + return executeExaTool("web_search_exa", args, "web_search_deep"); }, renderCall(args, theme) { @@ -404,7 +406,7 @@ Parameters: parameters: webSearchCrawlSchema, async execute(_toolCallId, params, _onUpdate, _ctx, _signal) { - return executeExaTool("crawling_exa", params as Record, "web_search_crawl"); + return executeExaTool("crawling", params as Record, "web_search_crawl"); }, renderCall(args, theme) { @@ -435,7 +437,7 @@ Parameters: parameters: webSearchLinkedinSchema, async execute(_toolCallId, params, _onUpdate, _ctx, _signal) { - return executeExaTool("linkedin_search_exa", params as Record, "web_search_linkedin"); + return executeExaTool("linkedin_search", params as Record, "web_search_linkedin"); }, renderCall(args, theme) { @@ -465,7 +467,7 @@ Parameters: parameters: webSearchCompanySchema, async execute(_toolCallId, params, _onUpdate, _ctx, _signal) { - return executeExaTool("company_research_exa", params as Record, "web_search_company"); + return executeExaTool("company_research", params as Record, "web_search_company"); }, renderCall(args, theme) { diff --git a/packages/coding-agent/src/core/tools/web-search/providers/exa.ts b/packages/coding-agent/src/core/tools/web-search/providers/exa.ts index 00cb5257b..3cb214a65 100644 --- a/packages/coding-agent/src/core/tools/web-search/providers/exa.ts +++ b/packages/coding-agent/src/core/tools/web-search/providers/exa.ts @@ -248,10 +248,8 @@ export async function searchExa(params: ExaSearchParams): Promise = { query: params.query, - num_results: params.num_results ?? 10, + numResults: params.num_results ?? 10, type: params.type ?? "auto", - text: true, // Include text for richer results - highlights: true, }; if (params.include_domains?.length) { @@ -267,7 +265,7 @@ export async function searchExa(params: ExaSearchParams): Promise