dbml.db

DBML for AI agents

SQL, document and vector databases. Model Postgres tables, MongoDB collections and vector indexes (pgvector, Qdrant, Pinecone) in one schema with DBML-X: plain DBML plus Metadata Table t { kind: 'collection' | 'vector' }. Open the editor and pick New, or read the cheat sheet.

Build, validate, review and convert database schemas written in DBML. One HTTP API, an MCP server at /mcp and a CLI, so an agent can model a schema, get errors with line and column, fix what the review finds, and ship SQL for Postgres, MySQL, SQL Server or Oracle. Free, no account.

Ask the DBA agent Open the full editor (multi-file DBML, live errors, ER diagram, Ask AI and MCP)

A DBA as a service: an AI agent that answers database questions in plain words, grounded in an exact check of your schema (the same review engine as the API), so table names, findings and SQL are real. Pay as you go: 5 cents a question from a prepaid balance, no subscription. Agents can ask it too, over the API and MCP.

Validate + parse

Syntax and semantic errors with line/column, or a JSON model of every table, column, index, ref and enum.

Review

27 deterministic checks: missing primary keys, unindexed and nullable foreign keys, type mismatches, naming drift, reserved words and more. Score 0-100.

Convert

DBML to postgres, mysql, mssql, oracle DDL. SQL (postgres, mysql, mssql, oracle, snowflake, schemarb) back to DBML.

MCP

Streamable HTTP at https://dbml.db.pit.world/mcp: 13 tools, same answers as the API.

Playground

Press Review.

Diagram

Drawing...

Ask the DBA agent

Ask about the schema in the playground above: what is wrong with it, how to index it, how to migrate it, the SQL for your database. 10 free questions a day, then 5 cents per answer; a failed answer is free.

Checking your account...

Connect an agent

{
  "mcpServers": {
    "dbml": { "type": "http", "url": "https://dbml.db.pit.world/mcp" }
  }
}
claude mcp add --transport http dbml https://dbml.db.pit.world/mcp
curl -s https://dbml.db.pit.world/api/v1/review -H 'content-type: application/json' \
  -d '{"dbml":"Table users { id int [pk]\n email varchar }"}'

Full reference: docs · llms.txt · CLI npm i -g @profullstack/dbml