UNPKG

@rolandohuber/mysql-mcp-server

Version:

A comprehensive MCP server for MySQL database operations with 16 tools, multi-transport support, and intelligent test data generation

30 lines 887 B
export const sampleDataSchema = { name: 'mysql_sampleData', description: 'Returns a sample of rows from a table', inputSchema: { type: 'object', properties: { table: { type: 'string', description: 'Name of the table to sample from', }, count: { type: 'number', description: 'Number of rows to return', minimum: 1, maximum: 1000, }, }, required: ['table', 'count'], }, }; export async function sampleDataHandler(mysqlService, args) { try { const rows = await mysqlService.sampleData(args.table, args.count); return rows; } catch (error) { throw new Error(`Failed to get sample data from ${args.table}: ${error}`); } } //# sourceMappingURL=sampleData.js.map