Skip to content
BEAD

SQL CREATE TABLE Generator

Infer column types from sample data and emit CREATE TABLE for PostgreSQL, MySQL, SQLite, or SQL Server.

CREATE TABLE
</>Use this tool programmaticallycurl · JavaScript · MCP

Same tool, callable from any HTTP client or from Claude (via MCP). Anonymous: 100 req/day per IP. Sign up for 1,000 req/day.

curl
curl https://api.b-e-a-d.com/tools/sql-create-table-generator/run \
  -H "Content-Type: application/json" \
  -d '{
  "input": "your input here",
  "tableName": "a",
  "dialect": "postgres",
  "ifNotExists": true
}'
JavaScript (fetch)
const res = await fetch("https://api.b-e-a-d.com/tools/sql-create-table-generator/run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "input": "your input here",
  "tableName": "a",
  "dialect": "postgres",
  "ifNotExists": true
}),
});
const data = await res.json();
console.log(data.result);
MCP (Claude Desktop / Claude Code)
# In Claude Desktop / Claude Code, add to your MCP config:
{
  "mcpServers": {
    "bead": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.b-e-a-d.com"]
    }
  }
}

# Then ask Claude to call:
mcp__bead__bead_sql_create_table_generator

Full reference: developer docs · OpenAPI spec

Type inference

Each column is scanned: if every value parses as an integer, it picks INT (or BIGINT when values get large); decimals become NUMERIC; date-like strings become DATE or TIMESTAMP; everything else is VARCHAR(n) sized to the longest sample.

Dialect quirks

PostgreSQL uses SERIAL/BIGSERIAL; MySQL uses AUTO_INCREMENT; SQLite folds everything to flexible type affinity. The generator picks the right primary-key syntax for the dialect you choose.

You might also like

Used in these workflows