MySQL Create Table
mysql_create_tableCreates a MySQL table with specified columns, data types, constraints, storage engine, charset, and collation settings.
Instructions
Create a new table with specified columns, engine, and charset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Table name | |
| table | No | Alias for name | |
| engine | No | Storage engine | InnoDB |
| charset | No | Character set | utf8mb4 |
| collate | No | Collation | utf8mb4_unicode_ci |
| columns | No | Column definitions. Anti-Hallucination Hint: Must be an array of objects (e.g. [{name: 'id', type: 'INT'}]), not a key-value object. | |
| comment | No | Table comment | |
| tableName | No | Alias for name | |
| ifNotExists | No | Add IF NOT EXISTS clause |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Error code (e.g. VALIDATION_ERROR, QUERY_ERROR) | |
| data | No | ||
| error | No | Error message if operation failed | |
| details | No | Additional error context | |
| metrics | No | Token estimation metrics | |
| success | Yes | Whether the operation succeeded | |
| category | No | Error category (validation, query, connection, internal) | |
| suggestion | No | Suggested fix for the error | |
| recoverable | No | Whether the error is recoverable |