Search by

datacircle / prism-tools

datacircle

Find the best GTM APIs, in Prism: four tools on Datacircle's open API, no key.

v0.1.0 2026-11-15 14:27 UTC

This package is not auto-updated.

Last update: 2026-11-16 13:24:37 UTC


README

Find the best GTM APIs. We benchmark all the GTM APIs and we put the results on our website.

https://datacircle.dev

This package gives Prism four tools that call Datacircle's open API, https://api.datacircle.dev/v1. You need no key and no account.

Tool What the tool gives Call
datacircle_list_apis Every GTM API on Datacircle, with the API's slug, number of plans, number of providers and best plan GET /apis
datacircle_best_plans One API's plans, sorted by score out of 100, best first. Each plan comes with a rank and a price per 1,000 calls GET /apis/{slug}/best
datacircle_search_plans Plans that match a provider name or plan name. Search all APIs or one API. Sort the plans by score, provider or price GET /plans
datacircle_provider The APIs a provider sells, and the provider's rank on each API GET /providers/{slug}

Install

composer require datacircle/prism-tools

The package needs PHP 8.2 or later and Prism 0.99 or later.

Use the tools

use Datacircle\Prism\Datacircle;
use Prism\Prism\Enums\Provider;
use Prism\Prism\Facades\Prism;

$response = Prism::text()
    ->using(Provider::Anthropic, 'claude-sonnet-5-5')
    ->withTools(Datacircle::tools())
    ->withMaxSteps(4)
    ->withPrompt('Who is the best provider for the email-finder API?')
    ->asText();

echo $response->text;

Set withMaxSteps to at least 2: one step calls a tool, and the next step reads the result. The tools work the same with asStream().

The four tool classes are in Datacircle\Prism: ListApisTool, BestPlansTool, SearchPlansTool and ProviderTool. You can give a model only some of the tools:

use Datacircle\Prism\BestPlansTool;
use Datacircle\Prism\ProviderTool;

$response = Prism::text()
    ->using(Provider::Anthropic, 'claude-sonnet-5-5')
    ->withTools([new BestPlansTool, new ProviderTool])
    ->withMaxSteps(4)
    ->withPrompt('Which APIs does Bright Data sell?')
    ->asText();

You can also run a tool yourself:

echo (new BestPlansTool)->handle(slug: 'email-finder', limit: 3);

Each tool gives back a JSON object. Each plan comes with a rank, provider, plan, score, price per 1,000 (perThousand, in dollars) and a page on datacircle.dev. That page lists every field. When the API gives no data, the tool returns {"error": "..."} with the API's own message. An unknown slug also returns {"error": "..."}. The model can then call again. A network failure throws an exception. Prism passes the exception message to the model. Call withoutToolErrorHandling() and Prism throws the exception instead.

The tools call the API with Laravel's Http client, so Http::fake() fakes the calls in your tests. new Client(baseUrl: ..., timeout: ...) sets the API address and the timeout in seconds. The timeout is 30 seconds by default. Pass the client to Datacircle::tools($client) or to each tool's constructor.

Network

Each tool call makes one HTTPS GET request to https://api.datacircle.dev/v1 and nothing else. The request holds only the tool's own arguments: no key and nothing from your chats or config. The API takes up to 60 calls a minute from one IP address. The tool waits once, for a minute at most, when the API asks the tool to wait. The package depends on Prism alone and stores nothing.

Links

MIT license.