Skip to main content
Glama
MikelA92

Metabase MCP Server

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,
      };
    });
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and adds valuable behavioral context: it declares the operation as 'read-only' and 'Risk: None', and specifies it lists 'all available databases'. This covers safety and scope, though it lacks details on output format or pagination.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with key information (emoji, safety note, purpose) in a single, efficient sentence. Every part adds value: the emoji sets context, '[SAFE]' highlights safety, and the rest explains usage and risk with zero waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (0 parameters, no output schema), the description is mostly complete: it covers purpose, safety, and usage. However, it lacks details on output format (e.g., list structure) and does not mention if it requires authentication, leaving minor gaps for a read-only tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are 0 parameters, and schema description coverage is 100%, so the baseline is high. The description adds no parameter-specific info, which is fine for a parameterless tool, but it does not explicitly state 'no parameters needed', so it slightly underperforms a perfect score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all available databases'), specifying it shows 'what data sources are connected to Metabase'. It distinguishes from siblings like 'get_database' (singular) and 'list_database_tables' (tables within a database).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides clear context: 'Use this to see what data sources are connected to Metabase', which implicitly guides when to use it. However, it does not explicitly state when not to use it or name alternatives among siblings, such as 'get_database' for a specific database.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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