Skip to main content
Glama
MikelA92
by MikelA92

list_databases

Retrieve all connected data sources in Metabase to identify available databases for querying and analysis.

Instructions

🗄️ [SAFE] List all available databases. Use this to see what data sources are connected to Metabase. Risk: None - read-only operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that fetches the list of databases from the Metabase API endpoint '/api/database/' and formats them into a readable text response for the MCP tool.
    async listDatabases() { this.logger.debug('Listing databases'); const response = await this.apiClient.makeRequest('/api/database/'); const databases = Array.isArray(response) ? response : response.data || []; return { content: [ { type: 'text', text: `Available Databases (${databases.length}): ${databases.map(db => `- ID: ${db.id} | Name: ${db.name} | Engine: ${db.engine}` ).join('\n')}`, }, ], }; }
  • The tool definition including name, description, and empty input schema (no parameters required). This is used by the MCP server for tool listing and validation.
    { name: 'list_databases', description: '🗄️ [SAFE] List all available databases. Use this to see what data sources are connected to Metabase. Risk: None - read-only operation.', inputSchema: { type: 'object', properties: {}, }, },
  • The registration/dispatch point in the executeTool switch statement that routes 'list_databases' tool calls to the appropriate handler method.
    case 'list_databases': return await this.databaseHandlers.listDatabases();
  • The handler for ListToolsRequest that returns all tool definitions, including list_databases, making it discoverable by MCP clients.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { this.logger.debug('Listing tools'); return { tools: TOOL_DEFINITIONS, }; });

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/MikelA92/metabase-mcp-mab'

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