{"uid":"cap_SIw5ILQ1ljuShfFUrEKsf","slug":"fastx402-sql-table-schema-parser-2bb9d3c4","name":"FastX402 SQL Table Schema Parser","description":"200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.","url":"https://fastx402.tools/sql-table-schema?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["sql"],"properties":{"sql":{"type":"string","description":"CREATE TABLE statement to parse"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"constraints":{"type":"array","items":{"type":"string"}}}}},"table_name":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"columns":[{"name":"id","type":"INTEGER","constraints":["PRIMARY KEY"]},{"name":"name","type":"TEXT","constraints":["NOT NULL"]},{"name":"email","type":"TEXT","constraints":["UNIQUE"]},{"name":"created_at","type":"TIMESTAMP","constraints":["DEFAULT CURRENT_TIMESTAMP"]}],"table_name":"users"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tlzM5SQtCX174QywOGzJi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses a SQL CREATE TABLE statement and returns a structured breakdown of the table name, column names, types, and constraints","exampleAgentPrompt":"Can you parse this CREATE TABLE statement for me and tell me the column names, their types, and any constraints? CREATE TABLE orders (id INTEGER PRIMARY KEY, user_id INTEGER NOT NULL, total DECIMAL(10,2), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP);","exampleUseCases":[{"title":"Auto-document database schema","prompt":"I have this SQL DDL and I need to understand all the columns, their data types, and constraints for documentation purposes — can you parse this CREATE TABLE statement: CREATE TABLE products (id INTEGER PRIMARY KEY, sku TEXT NOT NULL UNIQUE, price DECIMAL(10,2) NOT NULL, stock INTEGER DEFAULT 0);"},{"title":"Validate schema before migration","prompt":"Before I run this migration, can you break down the structure of this CREATE TABLE statement so I can verify the columns and constraints look right? CREATE TABLE sessions (session_id UUID PRIMARY KEY, user_id INTEGER NOT NULL, expires_at TIMESTAMP NOT NULL, data TEXT);"},{"title":"Generate ORM model from SQL","prompt":"I want to build an ORM model from this raw SQL — parse the column names, types, and constraints from this CREATE TABLE so I can map them to class fields: CREATE TABLE invoices (id SERIAL PRIMARY KEY, client_name TEXT NOT NULL, amount NUMERIC NOT NULL, due_date DATE, paid BOOLEAN DEFAULT FALSE);"}],"resultDescription":"A JSON object containing the table name as a string and a columns array where each entry includes the column name, data type, and an array of constraint strings (e.g. PRIMARY KEY, NOT NULL, UNIQUE, DEFAULT values).","failureModes":["Invalid or malformed SQL syntax returns an error or empty result","Non-CREATE TABLE statements (e.g. SELECT, INSERT) may not be supported","Very complex or dialect-specific SQL extensions may not parse correctly","Missing required 'sql' query parameter returns a 400-style error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, no-setup way to programmatically extract structured schema metadata from a SQL CREATE TABLE statement — especially in automated pipelines, code generation tools, or documentation workflows where parsing DDL manually is error-prone. It is ideal for agents that need column-level metadata (names, types, constraints) without running a live database connection.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T07:22:21.240Z","isFirstParty":false,"canonicalSlug":"fastx402-sql-table-schema-parser-2bb9d3c4"}