Expose deferred search content in MCP - #226
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
chruffins
force-pushed
the
hypeship/search-content-retrieval
branch
from
September 30, 2026 15:50
00c7576 to
2a5eae6
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 91fd3ad. Configure here.
chruffins
marked this pull request as ready for review
September 30, 2026 19:18
rgarcia
approved these changes
Oct 2, 2026
rgarcia
left a comment
Contributor
There was a problem hiding this comment.
reviewed — approving, schema now lines up with the api after 5dcfc39. a few non-blocking things worth a look:
Questions
src/lib/mcp/tools/search.ts:76-79,:95-97— the sharedsearchContentOptionshas no.describe()onformat,max_chars,max_age_hours,timeout_ms, andresult_ids/limit/the outertimeout_mshave none either. reusing it increatedropped descriptions create used to have ("zero forces a live fetch", per-result deadline, "Kernel does not delete it" onbrowser_id). worth porting those back, and making the 120s overall vs 60s per-resulttimeout_msexplicit.
Tests
src/lib/mcp/tools/search.test.ts:194— the 503 no-retry test only coverscreate. consider adding acontentscase: the success test at:79can't catch retries, and a retry here re-bills browser work.
Nits
src/lib/mcp/tools/search.ts:95— nit: the api requiresresult_idsto be unique (uniqueItems: true, 400 on duplicates). a set-size refine would catch duplicates before the api call.
This branch was successfully deployed
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
contentsaction toweb_searchfor fetching selected results from a retained searchTesting
bun test src/lib/mcp/tools/search.test.tsNote
Medium Risk
Introduces a new billable/browser-backed API path on web_search, though it mirrors existing no-retry and validation patterns used for create.
Overview
Adds a
contentsaction to the MCPweb_searchtool so clients can fetch page content for selected results from a retained search after the initial search, without re-running a billable query.The tool schema now accepts a
contentspayload (pick results byresult_idsorlimit, plus optional browser/provider content options) with Zod checks such as exactly one selector and validsource/browser_idcombinations. The handler POSTs to/search/{search_id}/contentswith URL-encoded IDs,maxRetries: 0, and a timeout derived from the request; descriptions call out possible browser charges.Tests cover a successful contents call (including reserved characters in
search_id) and extend invalid-input cases so badcontentsrequests fail before any API call.Reviewed by Cursor Bugbot for commit 91fd3ad. Configure here.