# CoCo SQL Formatter

> CoCo SQL Formatter is a paid API for AI agents from cocoeatsai.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Formats raw SQL queries into clean, readable SQL with optional keyword casing control

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/sql-format?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coco-sql-formatter-0bb0b349
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_z99FTuOwniAcV1SS9fZQD

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 coco-sql-formatter-0bb0b349
```

Example prompt: Can you format this SQL query so it's readable and has uppercase keywords: 'select id, name from users where active=1 and created_at > '2024-01-01' order by name'?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call SQL formatting service without setting up local tooling. Ideal for AI agents that dynamically generate or process SQL and need to present it in a human-readable form, or when standardizing keyword casing across a codebase on the fly.

## Known failure modes

- Invalid or unparseable SQL input may return an error or unformatted output
- Missing required 'sql' query parameter results in a bad request
- Unsupported keyword_case values may be ignored or cause errors
- Very long SQL queries may time out or be truncated

## How this service works

Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.

## Output

Returns a JSON object with a 'formatted' field containing the prettified SQL string, and a 'statements' field indicating how many SQL statements were found and formatted in the input.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ]
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "sql": {
       "type": "string"
      },
      "keyword_case": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "formatted"
     ],
     "properties": {
      "formatted": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "formatted": "SELECT 1",
  "statements": 1
 },
 "exampleNote": "Computed offline with demonstration inputs; time/random values are illustrative."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coco-sql-formatter-0bb0b349/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cocoeatsai.com](https://www.zero.xyz/host/cocoeatsai.com/llms.txt)
