Skip to main content
Glama
madhukarkumar

SingleStore MCP Server

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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: [],
      },
    },
  • Input schema definition for the 'list_tables' tool: an empty object with no properties or requirements.
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • 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: [],
    },
Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/madhukarkumar/singlestore-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server