create_table
Build and define new database tables on MCP-MySQL Server by specifying table names, fields, indexes, and column properties for structured data storage.
Instructions
Create a new table in the database
Input Schema
Name | Required | Description | Default |
---|---|---|---|
fields | Yes | ||
indexes | No | ||
table | Yes | Table name |
Input Schema (JSON Schema)
{
"properties": {
"fields": {
"items": {
"properties": {
"autoIncrement": {
"optional": true,
"type": "boolean"
},
"default": {
"description": "Default value for the column (as string).",
"optional": true,
"type": "string"
},
"length": {
"optional": true,
"type": "number"
},
"name": {
"type": "string"
},
"nullable": {
"optional": true,
"type": "boolean"
},
"primary": {
"optional": true,
"type": "boolean"
},
"type": {
"type": "string"
}
},
"required": [
"name",
"type"
],
"type": "object"
},
"type": "array"
},
"indexes": {
"items": {
"properties": {
"columns": {
"items": {
"type": "string"
},
"type": "array"
},
"name": {
"type": "string"
},
"unique": {
"optional": true,
"type": "boolean"
}
},
"required": [
"name",
"columns"
],
"type": "object"
},
"optional": true,
"type": "array"
},
"table": {
"description": "Table name",
"type": "string"
}
},
"required": [
"table",
"fields"
],
"type": "object"
}