list_tables
Retrieve a list of all tables in a SingleStore database for efficient querying and schema analysis using the MCP Server tool.
Instructions
List all tables in the database
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_tables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1450-1460 (handler)Primary handler implementation for the 'list_tables' tool within the MCP CallToolRequestSchema switch statement. Executes 'SHOW TABLES' SQL query on the database connection and returns the results as formatted JSON text content.
case 'list_tables': { const [rows] = await conn.query('SHOW TABLES') as [mysql.RowDataPacket[], mysql.FieldPacket[]]; return { content: [ { type: 'text', text: JSON.stringify(rows, null, 2), }, ], }; } - src/index.ts:1187-1194 (registration)Tool registration entry in the ListToolsRequestSchema handler's tools array, including name, description, and input schema (no required parameters).
name: 'list_tables', description: 'List all tables in the database', inputSchema: { type: 'object', properties: {}, required: [], }, }, - src/index.ts:1189-1194 (schema)Input schema definition for the 'list_tables' tool: an empty object with no properties or requirements.
inputSchema: { type: 'object', properties: {}, required: [], }, }, - src/index.ts:248-259 (handler)Secondary handler for 'list_tables' tool in the SSE HTTP API's handleRequest method, identical logic to the primary MCP handler.
case 'list_tables': // Call the same implementation as in setupToolHandlers const conn = await this.ensureConnection(); const [rows] = await conn.query('SHOW TABLES') as [mysql.RowDataPacket[], mysql.FieldPacket[]]; return { content: [ { type: 'text', text: JSON.stringify(rows, null, 2), }, ], }; - src/index.ts:146-152 (registration)Tool registration entry in the SSE API's cached tools list for listTools requests.
name: 'list_tables', description: 'List all tables in the database', inputSchema: { type: 'object', properties: {}, required: [], },