Toolkit: Reusable AI Tools for the Laravel AI SDK

Last updated on by

Toolkit: Reusable AI Tools for the Laravel AI SDK image

Toolkit, by Pushpak Chhajed under the Ship Fast Labs banner, is a community catalog of reusable tools for the Laravel AI SDK. The tools live in one monorepo but ship as separate Composer packages, so you install only the ones an agent needs.

One Package per Tool, No Service Providers

Every tool is a class implementing Laravel\Ai\Contracts\Tool — a description(), a handle(), and a schema(). There's no shared core, no service provider to register, and no published config. You require the package you want, instantiate the tool, and pass it to an agent's tools():

composer require shipfastlabs/toolkit-calculator
composer require shipfastlabs/toolkit-database
use Shipfastlabs\Toolkit\Calculator\CalculatorTool;
use Shipfastlabs\Toolkit\Database\DatabaseQueryTool;
 
$tools = [
new CalculatorTool,
new DatabaseQueryTool,
];

Each tool advertises its purpose through description() and its inputs through schema(), and the model decides when to call it. Results — including errors — come back as strings, so the model can read the failure and recover instead of the request throwing.

Calculator Without eval()

The Calculator tool takes an expression string and evaluates it with a recursive-descent parser rather than PHP's eval(). It supports +, -, *, /, %, ^ (right-associative exponent), parentheses, unary signs, and decimals. Invalid input, division or modulo by zero, and non-finite results are returned to the model as plain strings rather than thrown. It's a "pure" tool: no config, no service provider.

Read-Only Database Queries

The Database tool runs a single SQL SELECT and returns matching rows as pretty-printed JSON. Its guardrails are the point:

  • Only a single statement beginning with SELECT (or a WITH … SELECT CTE) is allowed.
  • INSERT, UPDATE, DELETE, DROP, ALTER, and similar keywords are rejected, even inside an otherwise-SELECT statement.
  • Queries containing ; separators are refused.
  • A LIMIT is appended to any query that lacks one.

Configurable tools read from an ai.toolkit.* key you add to the Laravel AI SDK's existing config/ai.php — there's no separate config file to publish:

// config/ai.php
 
'toolkit' => [
'database' => [
'connection' => env('TOOLKIT_DATABASE_CONNECTION'),
'max_rows' => (int) env('TOOLKIT_DATABASE_MAX_ROWS', 100),
],
],

Pointing connection at a read-only replica adds another layer of safety, and max_rows caps how many rows come back.

Web Search and Research Providers

Three packages wrap search and research APIs, each with a helper that registers the whole set at once or individual tool classes you can pick from:

  • Exa (toolkit-exa): ExaSearch, ExaFindSimilar, ExaGetContents, and ExaAnswer for embeddings-based web search, similarity lookups, content extraction, and sourced answers with citations.
  • Perplexity (toolkit-perplexity): PerplexitySearch for ranked sources and PerplexityAsk for cited answers across the Sonar models, with web, academic, and sec search modes.
  • Tavily (toolkit-tavily): TavilySearch, TavilyExtract, TavilyCrawl, and TavilyMap for search, content extraction, site crawling, and site mapping.
use Shipfastlabs\Toolkit\Exa\Exa;
 
$tools = Exa::all(); // Collection<int, Tool>

Each provider reads its API key from Laravel's services config and its optional defaults from ai.toolkit.*. Numeric parameters are clamped to valid ranges, enum parameters fall back to safe defaults, and API errors are caught and returned as strings rather than thrown.

JigsawStack's Endpoint Library

The JigsawStack package (toolkit-jigsawstack) exposes a tool per endpoint grouped into general, translation, web, vision, audio, and validation categories. That covers sentiment, summary, embeddings, text-to-SQL, time-series prediction, text and image translation, web search, AI scraping, HTML-to-image/PDF, VOCR, object detection, speech-to-text, and NSFW/profanity/spell/spam checks.

Each tool maps to one endpoint and returns the raw JSON response (pretty-printed) so the model can read every field. Requests time out after 60 seconds, and a missing API key returns a clear "not configured" message.

Installation

Pick the tools you need and require them individually — for example:

composer require shipfastlabs/toolkit-calculator
composer require shipfastlabs/toolkit-tavily

The remote-API tools need their provider key in config/services.php (and the matching .env entry); each tool's documentation page lists the exact config keys and defaults.

Browse the full catalog on the Toolkit website, and view the source on GitHub.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Tinkerwell

Enjoy coding and debugging in an editor designed for fast feedback and quick iterations. It's like a shell for your application – but with multi-line editing, code completion, and more.

Visit Tinkerwell
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell

The latest

View all →
Laracon US 2026 Reveals Its Full Speaker Lineup image

Laracon US 2026 Reveals Its Full Speaker Lineup

Read article
The State of PHP 2026 Survey Is Now Open image

The State of PHP 2026 Survey Is Now Open

Read article
Version-Controlled Documentation Inside Your Laravel App with Laradocs image

Version-Controlled Documentation Inside Your Laravel App with Laradocs

Read article
Typed Translation Accessors in Laravel 13.15.0 image

Typed Translation Accessors in Laravel 13.15.0

Read article
Refresh Your Laravel Database Without Dropping Every Table image

Refresh Your Laravel Database Without Dropping Every Table

Read article
JSON Schema Deserialization in Laravel 13.14 image

JSON Schema Deserialization in Laravel 13.14

Read article