feat: add Firecrawl tool package (scrape, map, search, crawl)#10
Open
MujahidAbbas wants to merge 1 commit into
Open
feat: add Firecrawl tool package (scrape, map, search, crawl)#10MujahidAbbas wants to merge 1 commit into
MujahidAbbas wants to merge 1 commit into
Conversation
Adds shipfastlabs/toolkit-firecrawl with five tools wrapping the Firecrawl v2 API: - FirecrawlScrape: a single URL to clean markdown (and other formats) - FirecrawlMap: discover a site's URLs - FirecrawlSearch: web/news/image search, optionally scraping each result - FirecrawlCrawl: start an async crawl, returns a crawl id - FirecrawlCrawlStatus: poll a crawl and collect results Follows the existing toolkit conventions: a Firecrawl::all() helper, a shared InteractsWithFirecrawl concern, #[Strict] tools, config read from services.firecrawl.key plus ai.toolkit.firecrawl.* defaults, allow-listed and clamped inputs, and string error recovery. Passes pint, rector, phpstan (max), 100% type coverage and 100% code coverage.
|
@MujahidAbbas is attempting to deploy a commit to the Pushpak Chhajed's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Adds
shipfastlabs/toolkit-firecrawl, a new tool package wrapping the Firecrawl v2 API.Tools
FirecrawlScrapePOST /v2/scrapeFirecrawlMapPOST /v2/mapFirecrawlSearchPOST /v2/searchFirecrawlCrawlPOST /v2/crawlFirecrawlCrawlStatusGET /v2/crawl/{id}Firecrawl's crawl is asynchronous, so it's split into a start tool + a status tool (mirroring Firecrawl's own MCP server) rather than blocking inside a single tool call.
Conventions followed
Firecrawl::all()helper returningCollection<int, Tool>, plus a sharedInteractsWithFirecrawlconcern (same pattern as the Exa package)#[Strict]tools, fluent schema, typedRequestaccessors, errors returned to the model as stringsservices.firecrawl.key(API key) andai.toolkit.firecrawl.*(optional defaults) — no config file or service provider shippedformats/sources, clamped numeric inputs, and a crawl-id format guard so an id can never be used to reach another endpointcomposer.jsonautoload +replacewired; README generated withtools/docgen.sh FirecrawlQuality gates
composer testpasses locally — Pint, Rector, PHPStan (max), 100% type coverage, 100% code coverage (374 tests, 750 assertions).Also validated end-to-end in a fresh Laravel app installing the package as a real dependency: every tool exercised against the live Firecrawl v2 API (scrape, map, search, async crawl + status) plus the guardrails, all green.
Happy to adjust scope (e.g. drop crawl/crawl-status for a tighter surface) if you'd prefer.