Skip to main content
Glama

Generate SaaS Database Schema

briefkit_generate_database_schema
Read-onlyIdempotent

Generate a complete, production-ready database schema for your SaaS product. Includes tables, foreign keys, indexes, and security baseline for immediate use in Supabase SQL editor.

Instructions

Generate a complete Supabase/PostgreSQL database schema for a SaaS product — tables with column types, foreign keys, indexes, and a security baseline. Ready to run in Supabase SQL editor.

Args:

  • product_name (string): Name of the SaaS product

  • saas_type (string): Type of SaaS — b2b, devtool, productivity, marketplace, or microsaas

  • custom_tables (array of strings): Additional product-specific table names beyond the standard ones

Returns: Complete SQL schema with CREATE TABLE statements, indexes, and security baseline (REVOKE statements for sensitive tables).

Examples:

  • "Generate schema for an inventory SaaS called StockFlow" -> saas_type="b2b", custom_tables=["products", "inventory", "suppliers"]

  • "Schema for a micro-SaaS invoice generator" -> saas_type="microsaas", custom_tables=["invoices", "clients", "line_items"]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_nameYesName of the SaaS product
saas_typeNoType of SaaS productmicrosaas
custom_tablesNoAdditional product-specific table names
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations (readOnlyHint=true, destructiveHint=false, idempotentHint=true) indicate safe, non-modifying behavior. Description adds value by explaining the output is a complete SQL schema ready to run, and clarifies what is included (indexes, security baseline). No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is concise: a single introductory sentence, followed by a structured list of arguments with examples. Every sentence adds value, and the front-loading of the purpose is effective. No redundant or vague statements.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters, no output schema), the description adequately explains the return format (SQL statements) and includes examples. It covers the essential behavioral context for an agent to decide on invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage for all three parameters. Description reinforces parameter meaning via examples (e.g., showing saas_type values and custom_tables usage). This adds contextual value beyond the schema descriptions, especially for custom_tables.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it generates a specific resource (Supabase/PostgreSQL database schema) listing included elements (tables, columns, foreign keys, indexes, security baseline). It effectively distinguishes from sibling tools which focus on design systems, RLS policies, and info, making the tool's unique purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description provides examples that imply typical use cases (e.g., generating schema for 'StockFlow' or 'invoice generator'), but it does not explicitly state when to use this tool vs. alternatives or when not to use it. The sibling tools are different enough that context is implied, but explicit guidance is lacking.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mithun4elp/briefkit-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server