execute_ddl
Execute a single DDL statement (CREATE, ALTER, DROP) on a specified database and auto-commit. Confirm structure beforehand to avoid irreversible loss.
Instructions
Execute a single DDL statement (CREATE/ALTER/DROP TABLE, CREATE INDEX, etc.) and auto-commit. Before altering or dropping an existing object, call inspect_table or list_objects first to confirm structure. WARNING: DDL is irreversible — dropped tables and columns cannot be recovered. For multiple statements use execute_script. Returns 'DDL executed and committed.' on success.
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": {
"database": "<database>",
"sql": "<sql>"
},
"name": "execute_ddl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database key from list_databases. | |
| sql | Yes | A single DDL statement. No trailing semicolon. |