# SQL Batch Safety & Performance Preflight

> SQL Batch Safety & Performance Preflight is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-13).

Runs safety and performance preflight checks on a batch of SQL queries at once, returning per-query pass/caution/block verdicts plus a rollup summary.

## Facts

- Endpoint: POST https://api.agentstools.dev/sql/batch
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sql-batch-safety-performance-preflight-c249d58a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4TX6ILKRTzbfQKQi7ZxHM

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sql-batch-safety-performance-preflight-c249d58a -d '<json body>'
```

Example prompt: Before I run these five SQL queries against our Postgres database, check all of them at once for safety and performance issues — here are the queries: 'SELECT * FROM users', 'DROP TABLE orders', 'DELETE FROM logs WHERE created_at < NOW() - INTERVAL 30 DAY', 'UPDATE accounts SET balance = 0', 'SELECT id FROM products WHERE active = true'.

## When to prefer this

Use this endpoint when you need to safety-check multiple SQL queries in a single call rather than making individual requests per query. It is ideal for CI/CD pipelines, pre-deployment migration reviews, or analyst query gating workflows where you need a batch rollup verdict alongside per-query detail. Prefer it over single-query preflight when you have 2+ queries to evaluate simultaneously.

## Known failure modes

- Missing required 'queries' field returns a validation error
- Invalid or unsupported SQL dialect causes rejection
- Empty queries array may return an empty results list
- Malformed query objects (missing name or text) cause per-item errors
- Network timeout on large batches
- Service may not detect all dangerous patterns — verdicts are indicators, not guarantees

## How this service works

Batch safety and performance preflight for many database queries at once: a list of objects each with a name and query text. Returns a per-query pass, caution or block verdict plus a rollup with the worst verdict and counts. Query-safety indicators, not a guarantee.

## Output

Returns a list of per-query objects each containing the query name and a verdict of pass, caution, or block, plus a rollup object showing the overall worst verdict across all queries and counts of each verdict type. These are safety indicators and not execution guarantees.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "dialect": {
   "enum": [
    "postgres",
    "mysql",
    "sqlite",
    "bigquery",
    "snowflake"
   ],
   "type": "string",
   "description": "Default dialect for entries that do not set one"
  },
  "queries": {
   "type": "array",
   "items": {
    "type": "object"
   },
   "description": "List of objects, each with a name and query text"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sql-batch-safety-performance-preflight-c249d58a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
