list_templates
List pre-built database schema templates for common app patterns, such as ecommerce, blog, SaaS, and social media, to generate realistic test data with proper relationships.
Instructions
List pre-built schema templates for common application patterns.
Available templates:
ecommerce: Customers, products, orders, order items, reviews (5 tables)
blog: Authors, posts, comments, tags, post_tags (5 tables)
saas: Organizations, members, subscriptions, invoices (4 tables)
social: Users, posts, likes, follows, messages (5 tables)
Each template includes realistic field types, proper foreign key relationships, weighted enum distributions, and auto-locale detection via country fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/lib/engine/templates/index.ts:25-35 (handler)Core implementation: iterates TEMPLATE_REGISTRY and returns a lightweight array of TemplateSummary objects (id, name, description, tables, default_counts), omitting the full schema.
export function listTemplates(): TemplateSummary[] { return Object.values(TEMPLATE_REGISTRY).map( ({ id, name, description, tables, default_counts }) => ({ id, name, description, tables, default_counts, }), ); } - The TemplateSummary interface defining the shape of objects returned by listTemplates() — id, name, description, tables, default_counts.
export interface TemplateSummary { id: string; name: string; description: string; tables: string[]; default_counts: Record<string, number>;