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) 

 [ ![MySQL Query Profiling in Laravel: EXPLAIN ANALYZE, Slow Query Log, and Index Hints](https://cdn.msaied.com/481/8bfc417cb94b3e2868428e065fe4b166.png) laravel mysql performance 

### MySQL Query Profiling in Laravel: EXPLAIN ANALYZE, Slow Query Log, and Index Hints

Stop guessing why a query is slow. Learn how to use EXPLAIN ANALYZE, Laravel's slow query log listener, and in...

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

 28 Jul 2026     4 min read  

  Read    

 ](https://msaied.com/articles/mysql-query-profiling-in-laravel-explain-analyze-slow-query-log-and-index-hints) [ ![Laravel Custom Eloquent Relations: Building Polymorphic and Composite-Key Relations](https://cdn.msaied.com/480/c7d2c0d0fd1823460fbdb138f77b573f.png) laravel eloquent database 

### Laravel Custom Eloquent Relations: Building Polymorphic and Composite-Key Relations

Eloquent's built-in relations cover 90% of cases, but composite-key joins and non-standard polymorphic pivots...

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

 28 Jul 2026     4 min read  

  Read    

 ](https://msaied.com/articles/laravel-custom-eloquent-relations-building-polymorphic-and-composite-key-relations) [ ![PostgreSQL JSONB in Laravel: Indexing, Querying, and Casting Without the Overhead](https://cdn.msaied.com/479/d7c54bd7a42ee57610a29f19a2c5e0fa.png) laravel postgresql jsonb 

### PostgreSQL JSONB in Laravel: Indexing, Querying, and Casting Without the Overhead

JSONB columns unlock flexible schemas, but misused they become performance sinkholes. This guide covers GIN in...

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

 28 Jul 2026     4 min read  

  Read    

 ](https://msaied.com/articles/postgresql-jsonb-in-laravel-indexing-querying-and-casting-without-the-overhead) 

   [  ![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)
