@rolandohuber/mysql-mcp-server
Version:
A comprehensive MCP server for MySQL database operations with 16 tools, multi-transport support, and intelligent test data generation
28 lines • 852 B
JavaScript
export const deleteSchema = {
name: 'mysql_delete',
description: 'Deletes records from a table based on a WHERE clause',
inputSchema: {
type: 'object',
properties: {
table: {
type: 'string',
description: 'Name of the table to delete from',
},
where: {
type: 'string',
description: 'WHERE clause condition (without the WHERE keyword)',
},
},
required: ['table', 'where'],
},
};
export async function deleteHandler(mysqlService, args) {
try {
const result = await mysqlService.delete(args.table, args.where);
return result;
}
catch (error) {
throw new Error(`Failed to delete records from ${args.table}: ${error}`);
}
}
//# sourceMappingURL=delete.js.map