list_tables
Retrieve a list of all tables in your MySQL database using this tool. Simplify schema management and streamline database operations for enhanced efficiency.
Instructions
List all tables in the database
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:639-649 (handler)The handler function that executes the 'SHOW TABLES' query and returns the list of tables as JSON text content.private async handleListTables() { const rows = await this.executeQuery('SHOW TABLES'); return { content: [ { type: 'text', text: JSON.stringify(rows, null, 2), }, ], }; }
- src/index.ts:470-474 (schema)Input schema for the list_tables tool, which takes no parameters.inputSchema: { type: 'object', properties: {}, required: [], },
- src/index.ts:468-475 (registration)Registration of the list_tables tool in the tools array, defining its name, description, and input schema.name: 'list_tables', description: 'List all tables in the database', inputSchema: { type: 'object', properties: {}, required: [], }, },
- src/index.ts:577-578 (registration)Dispatch in the request handler switch statement that routes 'list_tables' calls to the handler function.case 'list_tables': return await this.handleListTables();