[exa-mcp-server]: use highlights: true across all search tools#222
Open
devin-ai-integration[bot] wants to merge 4 commits intomainfrom
Open
[exa-mcp-server]: use highlights: true across all search tools#222devin-ai-integration[bot] wants to merge 4 commits intomainfrom
devin-ai-integration[bot] wants to merge 4 commits intomainfrom
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Switch web_search_exa from requesting context (server-generated LLM string) to highlights: true, which returns focused relevant snippets per result. - Replace context param with numSentences/highlightsPerUrl params - Format response as title/url/highlights per result - Update ExaSearchRequest type to support highlights Co-Authored-By: ishan <ishan@exa.ai>
…nces/highlightsPerUrl
Per feedback, use highlights: { maxCharacters: 4000 } which matches
the API pattern better than numSentences/highlightsPerUrl.
Co-Authored-By: ishan <ishan@exa.ai>
Apply highlights: true to all search tools (except webSearchAdvanced and deepSearch which have their own highlights config): - webSearch: simplified to highlights: true, removed maxCharacters param - companyResearch: highlights: true instead of text with maxCharacters - crawling: highlights: true instead of text with maxCharacters - peopleSearch: highlights: true instead of text with maxCharacters - linkedInSearch: highlights: true instead of text with maxCharacters All tools now format response as title/url/highlights per result. Co-Authored-By: ishan <ishan@exa.ai>
…ighlights: true
Testing revealed that the /contents endpoint (used by crawling_exa) ignores
highlights: true and returns text instead. Reverted crawling to use
text: { maxCharacters } as before.
Co-Authored-By: ishan <ishan@exa.ai>
72af12e to
c2d2c48
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switches search tools from requesting full
text/contextcontent tohighlights: true, which returns focused relevant snippets per search result.Tools updated:
web_search_exa:contents: { text: true, context: { maxCharacters: 10000 } }→contents: { highlights: true }(also removedcontextMaxCharactersparam)company_research_exa:contents: { text: { maxCharacters: 7000 } }→contents: { highlights: true }people_search_exa:contents: { text: { maxCharacters: ... } }→contents: { highlights: true }linkedin_search_exa:contents: { text: { maxCharacters: ... } }→contents: { highlights: true }Unchanged:
crawling_exa— the/contentsendpoint does not supporthighlights: true(returnstextregardless), so this tool remains ontext: { maxCharacters }withsanitizeContentsResponseweb_search_advanced_exa— excluded per requestdeep_search_exa— already uses highlights with its own configUpdated tools now return a formatted string with
Title/URL/Published/Highlightsper result (separated by---) instead of rawJSON.stringifyor the server-generatedcontextblob.Also updates
ExaSearchRequesttype intypes.tsto replacecontextwithhighlights.Updates since last revision
sanitizeSearchResponse/sanitizeContentsResponseutilities.sanitizeSearchResponseimports fromcompanyResearch,peopleSearch, andlinkedInSearchsince these tools now return formatted plaintext highlights instead ofJSON.stringify(response.data).crawling_exaretainssanitizeContentsResponsesince it still returns JSON.Review & Testing Checklist for Human
sanitizeSearchResponseis bypassed for updated tools — the recently-merged sanitizer is no longer called forcompanyResearch,peopleSearch, andlinkedInSearchbecause they now format results as plaintext. Verify the sanitizer wasn't protecting against anything critical (e.g., stripping sensitive fields from the API response).companyResearch,peopleSearch, andlinkedInSearchpreviously returnedJSON.stringify(response.data). They now return formatted plaintext (Title:\nURL:\nHighlights:\n...). Any MCP clients parsing JSON from these tools will break.contextMaxCharactersparam removed fromweb_search_exa— existing clients passing this param will get a schema validation error.Notes
ExaSearchRequest.contents.highlightstype supportsmaxCharacters,numSentences,highlightsPerUrl, andqueryfields, though onlytrue(boolean) is used by the updated tools.highlights: trueworks correctly on/searchbut NOT on/contents(crawling endpoint).Link to Devin session: https://app.devin.ai/sessions/828583886cd4479484cf6df638acdd7d