Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

SQL Syntax Checker

database.sql_validate_syntax

ProductionEngine wrapper (Class A)Deterministicstrictfastv1.0.0
No network

Overview

You pass SQL and a dialect; we check whether it parses at PARSE_ONLY level. We do not resolve table schemas, validate types, or run the statement. validationLevel in the response is always PARSE_ONLY. Do not use this when you need semantic, schema-aware, or runtime validation.

It's easy to say "SQL is validated" when you only mean "it parsed once." We label the level honestly so you know what you're getting.

Reliability

STRICT within the pinned JSqlParser profile. validationLevel is always PARSE_ONLY — syntax only, no schema or runtime checks. Domain errors (not retryable — fix input): SQL_DIALECT_UNSUPPORTED (dialect not in the supported list); SQL_PARSE_LIMIT_EXCEEDED (statement exceeds 200,000 characters or nesting depth 32); SQL_STATEMENT_LIMIT_EXCEEDED (more than 50 statements when allowMultipleStatements is true). Parse failures appear in findings[] with code SQL_SYNTAX_ERROR and do not raise a domain error — inspect findings and correct the SQL.

Context footprint

One call — pass SQL and dialect, get valid/invalid plus per-statement detail. A successful call costs 1 execution credit.

When to use it

When you need a fast syntax gate before deeper checks or execution.

When you need schema resolution, type checking, or a live dry-run.

Powered by JSqlParser, an open-source SQL parser used for dialect-aware tokenization at PARSE_ONLY level — no schema resolution or execution.

Scope

Note
Parse-level SQL syntax check for a dialect you name — nothing more.

Non-goals

  • Does not resolve schemas or table names
  • Does not execute SQL
  • Does not validate column types or constraints
  • Does not prove the statement will succeed at runtime

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

parsingvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input256 KB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
sqlstringYesBounded SQL source parsed without execution.
dialectstringNoSQL dialect; omit it for generic.
allowMultipleStatementsbooleanNoWhether more than one statement is accepted; omit it for false.

Output schema

FieldTypeRequiredDescription
validbooleanYesWhether parsing found no syntax error.
dialectstringYesApplied SQL dialect.
statementCountintegerYesParsed statement count.
statementsarrayYesBounded array of parsed statement receipts in source order. The item shape is defined by the nested schema and the array contains from 0 through 10000 items.
findingsarrayYesBounded array of safe structured database findings. The item shape is defined by the nested schema and the array contains from 0 through 20000 items.
validationLevelstringYesApplied validation level.
_metaobjectYesClosed SQL parser metadata receipt. Its documented receipt properties are bounded to 128 entries — unconstrained RFC 8259 JSON items.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"database.sql_validate_syntax","input":{"sql":"SELECT 1","dialect":"postgresql"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("database.sql_validate_syntax", {"sql":"SELECT id FROM users WHERE active = true","dialect":"postgresql"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
SQL_DIALECT_UNSUPPORTED400NoThe skill does not support the requested variant.
SQL_PARSE_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
SQL_STATEMENT_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not resolve schemas or table names
  • Does not execute SQL
  • Does not validate column types or constraints
  • Does not prove the statement will succeed at runtime
  • Schema-aware or semantic validation
  • Proving a query is safe to run in production

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "database.sql_validate_syntax",
  "input": {
    "sql": "SELECT id FROM users WHERE active = true",
    "dialect": "postgresql"
  }
}

Examples

Valid PostgreSQL select

Inputjson
{
  "sql": "SELECT id FROM users WHERE active = true",
  "dialect": "postgresql"
}
Expected outputjson
{
  "dialect": "postgresql",
  "statements": [
    {
      "type": "PLAINSELECT",
      "valid": true,
      "index": 0
    }
  ],
  "statementCount": 1,
  "findings": [],
  "valid": true,
  "_meta": {
    "parserProfile": "jsqlparser-5.3"
  },
  "validationLevel": "PARSE_ONLY"
}

Malformed SQL returns parse findings

Inputjson
{
  "sql": "SELECT FROM broken",
  "dialect": "postgresql"
}
Expected outputjson
{
  "dialect": "postgresql",
  "statements": [],
  "statementCount": 0,
  "findings": [
    {
      "details": {},
      "path": "/sql",
      "code": "SQL_SYNTAX_ERROR",
      "message": "SQL could not be parsed: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: \"SELECT\" <K_SELECT>     at line 1, column 1.  Was expecting one of:      \"WITH\"     <ST_SEMICOLON>",
      "severity": "error"
    }
  ],
  "valid": false,
  "_meta": {
    "parserProfile": "jsqlparser-5.3"
  },
  "validationLevel": "PARSE_ONLY"
}
  • Reject obviously malformed SQL before submission
  • Gate agent-generated queries in a CI step
  • Confirm dialect tokenization before parameterization

Avoid for

  • Schema-aware or semantic validation
  • Proving a query is safe to run in production

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

sqlparsingvalidationdatabase