From 5f99eaae85e6a6d02063cd7fee24d291fb69a4fb Mon Sep 17 00:00:00 2001 From: Benjamin Jackson Date: Thu, 16 Oct 2025 16:42:09 -0400 Subject: [PATCH 1/2] refactor(linkedin-search): Improve Exa search query and domain filtering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change search type to use more precise domain filtering - Switch from 'neural' to 'keyword' search type - Dynamically set includeDomains based on search type - Remove redundant search query modifications 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/tools/linkedInSearch.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/tools/linkedInSearch.ts b/src/tools/linkedInSearch.ts index 68e1767..dc1b3a4 100644 --- a/src/tools/linkedInSearch.ts +++ b/src/tools/linkedInSearch.ts @@ -33,17 +33,22 @@ export function registerLinkedInSearchTool(server: McpServer, config?: { exaApiK }); let searchQuery = query; + let includeDomains: string[]; + if (searchType === "profiles") { - searchQuery = `${query} LinkedIn profile`; + searchQuery = `${query}`; + includeDomains = ["linkedin.com/in"]; } else if (searchType === "companies") { - searchQuery = `${query} LinkedIn company`; + searchQuery = `${query}`; + includeDomains = ["linkedin.com/company"]; } else { - searchQuery = `${query} LinkedIn`; + searchQuery = `${query}`; + includeDomains = ["linkedin.com"]; } const searchRequest: ExaSearchRequest = { query: searchQuery, - type: "neural", + type: "keyword", numResults: numResults || API_CONFIG.DEFAULT_NUM_RESULTS, contents: { text: { @@ -51,7 +56,7 @@ export function registerLinkedInSearchTool(server: McpServer, config?: { exaApiK }, livecrawl: 'preferred' }, - includeDomains: ["linkedin.com"] + includeDomains: includeDomains }; logger.log("Sending request to Exa API for LinkedIn search"); From 72ec3cdd359403781943c68856db7d3beeae7b57 Mon Sep 17 00:00:00 2001 From: Benjamin Jackson Date: Thu, 16 Oct 2025 16:50:06 -0400 Subject: [PATCH 2/2] refactor(linkedin-search): Use keyword search for profiles/companies, neural for general MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use keyword search type for profile and company searches (more precise name matching) - Use neural search type for general LinkedIn searches (better semantic understanding) - Add dynamic searchTypeValue based on search type 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/tools/linkedInSearch.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/linkedInSearch.ts b/src/tools/linkedInSearch.ts index dc1b3a4..5c1710c 100644 --- a/src/tools/linkedInSearch.ts +++ b/src/tools/linkedInSearch.ts @@ -34,21 +34,25 @@ export function registerLinkedInSearchTool(server: McpServer, config?: { exaApiK let searchQuery = query; let includeDomains: string[]; + let searchTypeValue: "keyword" | "neural"; if (searchType === "profiles") { searchQuery = `${query}`; includeDomains = ["linkedin.com/in"]; + searchTypeValue = "keyword"; } else if (searchType === "companies") { searchQuery = `${query}`; includeDomains = ["linkedin.com/company"]; + searchTypeValue = "keyword"; } else { searchQuery = `${query}`; includeDomains = ["linkedin.com"]; + searchTypeValue = "neural"; } const searchRequest: ExaSearchRequest = { query: searchQuery, - type: "keyword", + type: searchTypeValue, numResults: numResults || API_CONFIG.DEFAULT_NUM_RESULTS, contents: { text: {