generate_sql
Create stored procedures, views, functions, triggers, migrations, and indexes from a specification. Returns structured SQL file content ready to save, without writing to disk.
Instructions
Generate SQL objects — stored procedures, views, functions, triggers, migrations, indexes — from a specification. Returns structured, saveable file content — never writes to disk itself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | Specification of the SQL object(s) to generate: purpose, tables involved, parameters, expected behavior | |
| model | No | Model to use (default: deepseek-chat) | |
| provider | No | AI Provider | |
| database_type | No | DB Engine (e.g. PostgreSQL, SQL Server, MySQL, SQLite) | |
| target_folder | No | Target folder for the generated SQL file(s) | |
| project_context | No | Existing schema/tables/conventions the output must match | |
| sql_object_type | No | Kind of SQL object (e.g. Stored Procedure, View, Function, Trigger, Migration, Index) | |
| naming_convention | No | Naming convention for SQL objects |