Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. π₯
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
style(php-sdk): tighten comments and prose in Laravel AI tools
Kris Oei3d65e51f64b6
diff --git a/apps/php-sdk/CHANGELOG.md b/apps/php-sdk/CHANGELOG.mdindex 541ee7c13..6559882a9 100644--- a/apps/php-sdk/CHANGELOG.md+++ b/apps/php-sdk/CHANGELOG.md@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Laravel AI SDK integration: native tool classes `FirecrawlScrape`, `FirecrawlSearch`,`FirecrawlMap`, and `FirecrawlCrawl` in `Firecrawl\Laravel\Tools`, plus a`FirecrawlTools::all()` helper. Drop them into any `laravel/ai` agent's `tools()`- array β API key and config are reused from the existing Laravel integration.+ array; API key and config are reused from the existing Laravel integration.Requires `laravel/ai ^0.9` (PHP 8.3+, Laravel 12+) in the consuming app.## [1.3.0] - 2026-05-12diff --git a/apps/php-sdk/README.md b/apps/php-sdk/README.mdindex d47fa9d70..491b5abcb 100644--- a/apps/php-sdk/README.md+++ b/apps/php-sdk/README.md@@ -396,7 +396,7 @@ The SDK ships native tool classes for the [Laravel AI SDK](https://laravel.com/dcomposer require laravel/ai```-Add Firecrawl capabilities to any agent β no MCP server or manual HTTP calls needed.+Add Firecrawl capabilities to any agent, no MCP server or manual HTTP calls needed.The tools resolve the `FirecrawlClient` from the container, so your existing`config/firecrawl.php` / `FIRECRAWL_API_KEY` setup is reused as-is:diff --git a/apps/php-sdk/src/Laravel/Tools/FirecrawlCrawl.php b/apps/php-sdk/src/Laravel/Tools/FirecrawlCrawl.phpindex 37983d2f6..80beccf5e 100644--- a/apps/php-sdk/src/Laravel/Tools/FirecrawlCrawl.php+++ b/apps/php-sdk/src/Laravel/Tools/FirecrawlCrawl.php@@ -21,7 +21,7 @@ class FirecrawlCrawl extends FirecrawlTool{return 'Crawl a website with Firecrawl starting from a URL, following its links and returning '. 'each crawled page as a {url, markdown} object in a JSON array. This is a slower, '- . 'multi-page operation that waits for the crawl to finish β prefer firecrawl_scrape when '+ . 'multi-page operation that waits for the crawl to finish. Prefer firecrawl_scrape when '. 'you only need one known page, and keep the page limit small.';}diff --git a/apps/php-sdk/src/Laravel/Tools/FirecrawlMap.php b/apps/php-sdk/src/Laravel/Tools/FirecrawlMap.phpindex 91136b88b..e15e15c70 100644--- a/apps/php-sdk/src/Laravel/Tools/FirecrawlMap.php+++ b/apps/php-sdk/src/Laravel/Tools/FirecrawlMap.php@@ -18,8 +18,8 @@ class FirecrawlMap extends FirecrawlToolpublic function description(): string{return 'Map a website with Firecrawl to discover the URLs it contains, returned as a JSON '- . 'array of {url, title} objects. Use this to find pages on a specific site β optionally '- . 'filtered by a search term β before scraping or crawling them.';+ . 'array of {url, title} objects. Use this to find pages on a specific site, optionally '+ . 'filtered by a search term, before scraping or crawling them.';}public function handle(Request $request): stringdiff --git a/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlCrawlTest.php b/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlCrawlTest.phpindex 1e70fd3a0..c5fe8ea86 100644--- a/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlCrawlTest.php+++ b/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlCrawlTest.php@@ -11,9 +11,9 @@ use Laravel\Ai\Tools\Request;it('crawls a site and returns pages as JSON', function (): void {$history = new ArrayObject();$client = fakeFirecrawlClient([- // POST /v2/crawl β start the job+ // POST /v2/crawl: start the jobnew Response(200, [], json_encode(['success' => true, 'id' => 'job-1'])),- // GET /v2/crawl/job-1 β first poll, already completed+ // GET /v2/crawl/job-1: first poll, already completednew Response(200, [], json_encode(['success' => true,'status' => 'completed',diff --git a/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlScrapeTest.php b/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlScrapeTest.phpindex 5c7272b76..a3465af9f 100644--- a/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlScrapeTest.php+++ b/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlScrapeTest.php@@ -85,7 +85,6 @@ it('converts non-SDK failures into readable strings instead of throwing', functiContainer::setInstance(new Container());try {- // No FirecrawlClient binding β container resolution fails inside handle().$result = (new FirecrawlScrape())->handle(new Request(['url' => 'https://example.com']));} finally {Container::setInstance(null);diff --git a/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlToolsTest.php b/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlToolsTest.phpindex 5150d9650..f9e8e104f 100644--- a/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlToolsTest.php+++ b/apps/php-sdk/tests/Unit/LaravelTools/FirecrawlToolsTest.php@@ -27,6 +27,5 @@ it('passes an explicit client through to every tool', function (): void {[$scrape] = FirecrawlTools::all($client);- // Uses the injected client (no container involved) β would throw otherwise.expect($scrape->handle(new Request(['url' => 'https://example.com'])))->toBe('# Hi');});