Toolkit: Reusable AI Tools for Laravel AI SDK | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    Toolkit: Reusable AI Tools for the Laravel AI SDK        On this page       1. [  Modular and Independent Tools ](#modular-and-independent-tools)
2. [  Featured Tools ](#featured-tools)
3. [  Calculator Without eval() ](#calculator-without-codeevalcode)
4. [  Read-Only Database Queries ](#read-only-database-queries)
5. [  Web Search and Research Providers ](#web-search-and-research-providers)
6. [  JigsawStack's Endpoint Library ](#jigsawstacks-endpoint-library)
7. [  Installation and Configuration ](#installation-and-configuration)
8. [  Key Takeaways ](#key-takeaways)

  ![Toolkit: Reusable AI Tools for the Laravel AI SDK](https://cdn.msaied.com/128/0432e315b1f06dff94d80d0bea9a8b7b.png)

 [  Laravel ](https://msaied.com/articles?category=laravel) [  Composer Pacakge ](https://msaied.com/articles?category=composer-pacakge)  #Laravel AI SDK   #AI Tools   #PHP Packages   #Composer   #Laravel Development   #Artificial Intelligence  

 Toolkit: Reusable AI Tools for the Laravel AI SDK 
===================================================

     12 Jun 2026      4 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   Modular and Independent Tools  ](#modular-and-independent-tools)
2. [  02   Featured Tools  ](#featured-tools)
3. [  03   Calculator Without eval()  ](#calculator-without-codeevalcode)
4. [  04   Read-Only Database Queries  ](#read-only-database-queries)
5. [  05   Web Search and Research Providers  ](#web-search-and-research-providers)
6. [  06   JigsawStack's Endpoint Library  ](#jigsawstacks-endpoint-library)
7. [  07   Installation and Configuration  ](#installation-and-configuration)
8. [  08   Key Takeaways  ](#key-takeaways)

 The Laravel AI SDK offers powerful capabilities for building intelligent applications. To further enhance this, Ship Fast Labs, under the direction of Pushpak Chhajed, has introduced "Toolkit," a community catalog of reusable AI tools. This initiative provides developers with a streamlined way to integrate diverse AI functionalities into their Laravel projects.

Modular and Independent Tools
-----------------------------

Toolkit emphasizes a modular approach, with each tool packaged as a separate Composer dependency. This design ensures that developers only install the specific tools required by their AI agents, avoiding unnecessary overhead. There's no shared core, no service provider registration, and no published configuration files. Each tool is a class that implements `Laravel\Ai\Contracts\Tool`, defining a `description()`, a `handle()`, and a `schema()` method.

Installation is straightforward:

```bash
composer require shipfastlabs/toolkit-calculator
composer require shipfastlabs/toolkit-database

```

Once installed, tools are instantiated and passed to an agent's `tools()` method:

```php
use Shipfastlabs\Toolkit\Calculator\CalculatorTool;
use Shipfastlabs\Toolkit\Database\DatabaseQueryTool;

$tools = [
    new CalculatorTool,
    new DatabaseQueryTool,
];

```

The `description()` method advertises the tool's purpose, while `schema()` defines its expected inputs. This allows the AI model to intelligently decide when and how to invoke a tool. Importantly, results, including errors, are returned as strings, enabling the model to interpret failures and attempt recovery.

Featured Tools
--------------

### Calculator Without `eval()`

The Calculator tool processes mathematical expressions using a recursive-descent parser, avoiding PHP's `eval()` for enhanced security. It supports standard arithmetic operations (`+`, `-`, `*`, `/`, `%`), exponentiation (`^`), parentheses, unary signs, and decimals. Invalid inputs or errors like division by zero are gracefully handled, returning informative strings to the model.

### Read-Only Database Queries

For secure data retrieval, the Database tool executes single SQL `SELECT` statements, returning results as pretty-printed JSON. It incorporates robust guardrails:

- Only `SELECT` statements (including `WITH … SELECT` CTEs) are permitted.
- `INSERT`, `UPDATE`, `DELETE`, `DROP`, `ALTER`, and similar keywords are strictly rejected.
- Queries containing `;` separators are disallowed.
- A `LIMIT` clause is automatically appended if missing.

This tool can be configured within `config/ai.php`:

```php
// config/ai.php

'toolkit' => [
    'database' => [
        'connection' => env('TOOLKIT_DATABASE_CONNECTION'),
        'max_rows' => (int) env('TOOLKIT_DATABASE_MAX_ROWS', 100),
    ],
],

```

This allows specifying a read-only database connection and capping the number of returned rows for added security and performance.

### Web Search and Research Providers

Toolkit integrates with several prominent search and research APIs, offering helper functions to register entire sets of tools or individual classes:

- **Exa (`toolkit-exa`):** Provides `ExaSearch`, `ExaFindSimilar`, `ExaGetContents`, and `ExaAnswer` for embeddings-based web search, similarity lookups, content extraction, and cited answers.
- **Perplexity (`toolkit-perplexity`):** Offers `PerplexitySearch` for ranked sources and `PerplexityAsk` for cited answers across Sonar models, supporting `web`, `academic`, and `sec` search modes.
- **Tavily (`toolkit-tavily`):** Includes `TavilySearch`, `TavilyExtract`, `TavilyCrawl`, and `TavilyMap` for search, content extraction, site crawling, and site mapping.

API keys are managed via Laravel's `services` configuration, and optional defaults can be set in `ai.toolkit.*`. The tools handle API errors by returning strings, preventing application crashes.

### JigsawStack's Endpoint Library

The JigsawStack package (`toolkit-jigsawstack`) exposes a tool for each endpoint, categorized into general, translation, web, vision, audio, and validation services. This covers a wide array of functionalities, from sentiment analysis and text-to-SQL to image translation and object detection. Each tool returns the raw JSON response, allowing the model to process all available data. Requests time out after 60 seconds, and clear messages are provided for missing API keys.

Installation and Configuration
------------------------------

To use Toolkit, simply require the desired packages via Composer. For remote API tools, ensure the corresponding provider key is configured in `config/services.php` and its `.env` entry. Detailed configuration instructions are available on each tool's documentation page.

Key Takeaways
-------------

- Toolkit offers a modular collection of reusable AI tools for the Laravel AI SDK.
- Each tool is an independent Composer package, minimizing dependencies.
- Tools implement `Laravel\Ai\Contracts\Tool` with `description()`, `handle()`, and `schema()` methods.
- Includes secure Calculator, read-only Database query, and integrations with Exa, Perplexity, Tavily, and JigsawStack APIs.
- Configuration is integrated with Laravel's existing `config/ai.php` and `config/services.php`.

Explore the full catalog on the [Toolkit website](https://toolkit.shipfastlabs.com/) and view the source code on [GitHub](https://github.com/shipfastlabs/toolkit).

Source: [Toolkit: Reusable AI Tools for the Laravel AI SDK](https://laravel-news.com/toolkit-reusable-ai-tools-for-the-laravel-ai-sdk)

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fmsaied.com%2Farticles%2Ftoolkit-reusable-ai-tools-for-the-laravel-ai-sdk&text=Toolkit%3A+Reusable+AI+Tools+for+the+Laravel+AI+SDK) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fmsaied.com%2Farticles%2Ftoolkit-reusable-ai-tools-for-the-laravel-ai-sdk) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  What is Toolkit for the Laravel AI SDK?        Toolkit is a community-driven catalog of reusable AI tools designed for the Laravel AI SDK. It provides modular, independent Composer packages that developers can integrate into their Laravel AI agents to add various functionalities like calculations, database queries, and web search capabilities. 

      Q02  How do I install and use a Toolkit tool?        You install Toolkit tools individually via Composer (e.g., `composer require shipfastlabs/toolkit-calculator`). Each tool is a class implementing `Laravel\Ai\Contracts\Tool`. You then instantiate the tool and pass it to your AI agent's `tools()` method. No shared core or service providers are required. 

      Q03  What kind of tools are available in Toolkit?        Toolkit includes a variety of tools such as a secure Calculator, a read-only Database query tool with guardrails, integrations with web search and research providers like Exa, Perplexity, and Tavily, and a comprehensive library of JigsawStack API endpoints covering sentiment analysis, translation, and more. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://msaied.com/articles) 

 [ ![Filament v3.3.54 Release Notes](https://cdn.msaied.com/127/9d69c31b365d86d4b5fd8377bc18afa2.png) Filament Laravel PHP 

### Filament v3.3.54 Release Notes

Discover the latest updates in Filament v3.3.54. This release focuses on bug fixes and minor improvements for...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 12 Jun 2026     2 min read  

  Read    

 ](https://msaied.com/articles/filament-v3354-release-notes) [ ![Filament v3.3.53 Release Notes](https://cdn.msaied.com/125/1ae0eeb0cf66afeb0bce8dc48b6c5121.png) Filament Laravel PHP 

### Filament v3.3.53 Release Notes

Explore the latest updates in Filament v3.3.53. This release focuses on bug fixes and minor improvements for t...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 12 Jun 2026     2 min read  

  Read    

 ](https://msaied.com/articles/filament-v3353-release-notes) [ ![Claude Code v2.1.175 Released](https://cdn.msaied.com/129/16f5a2b9bc433e9a1fb7fe0e59936601.png) Claude Code Anthropic Release 

### Claude Code v2.1.175 Released

Anthropic has released version 2.1.175 of Claude Code, a minor update to their public repository. This release...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 12 Jun 2026     2 min read  

  Read    

 ](https://msaied.com/articles/claude-code-v21175-released) 

   [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

Explore

- [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [Contact](https://msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
