add_columnAdd a new column to an existing tableInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
},
"field": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Column name"
},
"type": {
"type": "string",
"description": "MySQL column type"
},
"length": {
"type": "number",
"description": "Column length"
},
"nullable": {
"type": "boolean",
"description": "Allow NULL values"
},
"default": {
"type": [
"string",
"number",
"null"
],
"description": "Default value"
}
},
"required": [
"name",
"type"
],
"description": "Column definition"
}
},
"required": [
"table",
"field"
]
} | — | | — |
alter_columnModify an existing column (type, nullable, default, or rename)Input schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
},
"column": {
"type": "string",
"description": "Column name to modify"
},
"type": {
"type": "string",
"description": "New column type"
},
"length": {
"type": "number",
"description": "New column length"
},
"nullable": {
"type": "boolean",
"description": "Allow NULL values"
},
"default": {
"type": [
"string",
"number",
"null"
],
"description": "New default value"
},
"newName": {
"type": "string",
"description": "New column name (for renaming)"
}
},
"required": [
"table",
"column"
]
} | — | | — |
connect_dbConnect to a MySQL database using URL, workspace config, or direct parametersInput schema{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Database URL (mysql://user:pass@host:port/db)"
},
"workspace": {
"type": "string",
"description": "Project workspace path containing .env file"
},
"host": {
"type": "string",
"description": "Database host"
},
"port": {
"type": "number",
"description": "Database port (default: 3306)"
},
"user": {
"type": "string",
"description": "Database user"
},
"password": {
"type": "string",
"description": "Database password"
},
"database": {
"type": "string",
"description": "Database name"
}
}
} | — | | — |
create_tableCreate a new table with specified columns and indexesInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Column name"
},
"type": {
"type": "string",
"description": "MySQL column type"
},
"length": {
"type": "number",
"description": "Column length"
},
"nullable": {
"type": "boolean",
"description": "Allow NULL values"
},
"default": {
"type": [
"string",
"number",
"null"
],
"description": "Default value"
},
"autoIncrement": {
"type": "boolean",
"description": "Auto-increment"
},
"primary": {
"type": "boolean",
"description": "Primary key"
}
},
"required": [
"name",
"type"
]
},
"description": "Column definitions"
},
"indexes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Index name"
},
"columns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Indexed columns"
},
"unique": {
"type": "boolean",
"description": "Unique index"
}
},
"required": [
"name",
"columns"
]
},
"description": "Index definitions"
}
},
"required": [
"table",
"fields"
]
} | — | | — |
describe_tableGet detailed structure of a table including columns, types, and constraintsInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
}
},
"required": [
"table"
]
} | — | | — |
drop_columnRemove a column from a tableInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
},
"column": {
"type": "string",
"description": "Column name to drop"
}
},
"required": [
"table",
"column"
]
} | — | | — |
drop_tableDelete a table (requires confirmation)Input schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
},
"confirm": {
"type": "boolean",
"description": "Set to true to confirm deletion"
}
},
"required": [
"table",
"confirm"
]
} | — | | — |
executeExecute an INSERT, UPDATE, or DELETE queryInput schema{
"type": "object",
"properties": {
"sql": {
"type": "string",
"description": "The SQL query (INSERT, UPDATE, DELETE) to execute"
},
"params": {
"type": "array",
"items": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"description": "Optional parameters to bind to query placeholders (?)"
}
},
"required": [
"sql"
]
} | — | | — |
get_foreign_keysList all foreign key relationships for a tableInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
}
},
"required": [
"table"
]
} | — | | — |
get_indexesList all indexes on a tableInput schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
}
},
"required": [
"table"
]
} | — | | — |
list_databasesList all accessible databases on the serverInput schema{
"type": "object",
"properties": {}
} | — | | — |
list_tablesList all tables in the connected databaseInput schema{
"type": "object",
"properties": {}
} | — | | — |
queryExecute a SELECT query and return resultsInput schema{
"type": "object",
"properties": {
"sql": {
"type": "string",
"description": "The SQL SELECT query to execute"
},
"params": {
"type": "array",
"items": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"description": "Optional parameters to bind to query placeholders (?)"
}
},
"required": [
"sql"
]
} | — | | — |
truncate_tableRemove all rows from a table (requires confirmation)Input schema{
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "Table name"
},
"confirm": {
"type": "boolean",
"description": "Set to true to confirm truncation"
}
},
"required": [
"table",
"confirm"
]
} | — | | — |