Skip to content

feat: add Firecrawl tool package (scrape, map, search, crawl)#10

Open
MujahidAbbas wants to merge 1 commit into
shipfastlabs:mainfrom
MujahidAbbas:feat/firecrawl-tool
Open

feat: add Firecrawl tool package (scrape, map, search, crawl)#10
MujahidAbbas wants to merge 1 commit into
shipfastlabs:mainfrom
MujahidAbbas:feat/firecrawl-tool

Conversation

@MujahidAbbas

Copy link
Copy Markdown

Adds shipfastlabs/toolkit-firecrawl, a new tool package wrapping the Firecrawl v2 API.

Tools

Tool Endpoint What it does
FirecrawlScrape POST /v2/scrape Scrape a single URL to clean markdown (also html, rawHtml, links, summary)
FirecrawlMap POST /v2/map Discover a site's URLs, with an optional search filter
FirecrawlSearch POST /v2/search Web/news/image search, optionally scraping each result into markdown
FirecrawlCrawl POST /v2/crawl Start an asynchronous crawl; returns a crawl id
FirecrawlCrawlStatus GET /v2/crawl/{id} Poll a crawl and collect its pages

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 returning Collection<int, Tool>, plus a shared InteractsWithFirecrawl concern (same pattern as the Exa package)
  • #[Strict] tools, fluent schema, typed Request accessors, errors returned to the model as strings
  • Config read from services.firecrawl.key (API key) and ai.toolkit.firecrawl.* (optional defaults) — no config file or service provider shipped
  • Allow-listed formats/sources, clamped numeric inputs, and a crawl-id format guard so an id can never be used to reach another endpoint
  • Root composer.json autoload + replace wired; README generated with tools/docgen.sh Firecrawl

Quality gates

composer test passes 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.

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.
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant