get_table_ddl
Generate CREATE TABLE DDL scripts for existing database tables, including columns, constraints, and optional indexes to document or replicate table structures.
Instructions
Generates CREATE TABLE DDL script for an existing table, including columns, constraints, and optionally indexes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tableName": "<tableName>"
},
"name": "get_table_ddl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tableName | Yes | Name of the table to generate DDL for (can include schema: schema.table) | |
| includeIndexes | No | Include index definitions (default: true) | |
| includeConstraints | No | Include foreign key constraints (default: true) |