Skip to main content
Glama

list_databases

Retrieve all accessible databases on a MySQL server to identify available data sources for querying and analysis.

Instructions

List all accessible databases on the MySQL server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'list_databases' tool. Executes 'SHOW DATABASES' SQL query using the shared executeQuery function and returns the results as formatted JSON text content.
    case "list_databases": { console.error('[Tool] Executing list_databases'); const { rows } = await executeQuery( pool, 'SHOW DATABASES' ); return { content: [{ type: "text", text: JSON.stringify(rows, null, 2) }] }; }
  • src/index.ts:66-74 (registration)
    Registration of the 'list_databases' tool in the ListTools response, including name, description, and empty input schema (no parameters required).
    { name: "list_databases", description: "List all accessible databases on the MySQL server", inputSchema: { type: "object", properties: {}, required: [] } },
  • Input schema definition for 'list_databases' tool: an empty object (no input parameters).
    inputSchema: { type: "object", properties: {}, required: [] }

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/Himanshu-Agg12/mcp-mysql-lens'

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