Repository navigation
fix(find-tools): validate urls at runtime instead of publishing a schema pattern - #518
Open
nickscamara wants to merge 9 commits into
Open
nickscamara wants to merge 9 commits into
nickscamara wants to merge 9 commits into
Conversation
…ema pattern Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Fixes URL-scoped discovery for ChatGPT by removing the published urls pattern from firecrawl_find_tools and validating absolute http(s) URLs at runtime instead; focused tests and updated contract snapshots keep the change bounded.
View guided diff | Turn on auto-fix | Re-trigger cubic
…hots Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…hots Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…hots Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…chema Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # tests/contract-snapshots/hosted-account.json # tests/contract-snapshots/hosted-full.json # tests/contract-snapshots/hosted-search-companion.json # tests/contract-snapshots/hosted-search-primary.json # tests/contract-snapshots/http-self-hosted.json # tests/contract-snapshots/stdio-api-key.json # tests/contract-snapshots/stdio-keyless.json # tests/contract-snapshots/stdio-self-hosted.json # tests/contract-snapshots/tool-definitions.json # tests/mcp-alexandria-discovery.test.mjs
…chema Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # tests/contract-snapshots/hosted-search-companion.json # tests/contract-snapshots/hosted-search-primary.json
…chema Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # src/alexandria.ts # tests/contract-snapshots/hosted-account.json # tests/contract-snapshots/hosted-full.json # tests/contract-snapshots/hosted-search-companion.json # tests/contract-snapshots/hosted-search-primary.json # tests/contract-snapshots/http-self-hosted.json # tests/contract-snapshots/stdio-api-key.json # tests/contract-snapshots/stdio-keyless.json # tests/contract-snapshots/stdio-self-hosted.json # tests/contract-snapshots/tool-definitions.json
…chema Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # tests/contract-snapshots/hosted-account.json # tests/contract-snapshots/hosted-full.json # tests/contract-snapshots/hosted-search-companion.json # tests/contract-snapshots/hosted-search-primary.json # tests/contract-snapshots/http-self-hosted.json # tests/contract-snapshots/stdio-api-key.json # tests/contract-snapshots/stdio-keyless.json # tests/contract-snapshots/stdio-self-hosted.json
This branch has not been 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.
Why
URL-scoped discovery (
firecrawl_find_toolswithurls) doesn't work from ChatGPT. Theurlsitems publishpattern: "^https?:\/\/"in the tool's input schema. ChatGPT's connector validates arguments against that pattern before calling the server, and it rejects ordinaryhttps://URLs. Our own zod check accepts the same URLs, so the requests never reach the server.Evidence from Alexandria feedback (2026-09-22 to 10-09, aggregated): 18 teams, 31 reports. 27 of the reports come from
mcp-ua-openai-mcp(3.25.4 through 3.26.0) and the rest from Codex/OpenCode. The agents describe it the same way, for example "URLs selector rejected valid HTTPS addresses" or "rejected by connector validation despite matching its documented pattern". Most then said "coverage for this website could not be assessed" and scraped the site themselves.This matters beyond those 18 teams. Over the same window, 44 ChatGPT teams rated a site partial or bad after semantic-only discovery found nothing, on hosts where URL discovery does return a provider (x.com, LinkedIn, Booking, eBay, Amazon, Spotify, ...). For those agents, URL-scoped discovery is the fallback, and this bug blocked it.
Change
urlsitems are now{ type: "string" }with a description. They no longer carrypatternorformat. A zodrefine(not serialised to JSON Schema) still rejects anything thatnew URL()doesn't parse ashttp:/https:, so bare domains,ftp:andjavascript:never reach the API. An uppercase scheme (HTTPS://...) used to fail the pattern and now passes.urlsgets a description telling the agent to pass a page URL rather than only the domain. Bare hosts such ashttps://podcasts.apple.commatch nothing, while a show URL matches Particle.firecrawl_find_toolsurlsnode, and its definition hash in every profile.pattern/formatonurls,HTTPS://is forwarded, and invalid URLs are rejected without calling the API.This is narrower than the stale #396, which targets
src/index.ts, removed in the server split, and doesn't touchfirecrawl_find_tools.pnpm exec tsc --noEmit,pnpm lintandpnpm test(192 tests) pass locally.Summary by cubic
Fixes
firecrawl_find_toolsURL-scoped discovery, which ChatGPT rejected because theurlsitems published apattern: "^https?:\/\/"in the input schema. The server's zod check accepted the same URLs, so requests never reached the API.patternorformatonurlsitems. The runtime check requires an explicithttp(s)://prefix, rejects bare domains and malformed schemes, and now accepts uppercase schemes likeHTTPS://.pattern/format, uppercase schemes are forwarded, and invalid URLs are rejected without calling the API.main; only thefirecrawl_find_toolsurlsnode and its definition hash change.Written for commit 33845a2. Summary will update on new commits.