Skip to main content
Glama
MikelA92

Metabase MCP Server

by MikelA92

list_dashboards

Retrieve all available dashboards from Metabase to discover or locate specific dashboards by name. This read-only operation provides access to dashboard information.

Instructions

๐Ÿ“Š [SAFE] List all dashboards in Metabase. Use this to discover available dashboards or find dashboards by name. Risk: None - read-only operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the list_dashboards tool. It fetches all dashboards from the Metabase API endpoint '/api/dashboard' and returns a formatted text response listing up to 50 dashboards with their IDs and names.
      async listDashboards() {
        this.logger.debug('Listing dashboards');
        const dashboards = await this.apiClient.makeRequest('/api/dashboard');
        
        return {
          content: [
            {
              type: 'text',
              text: `Found ${dashboards.length} dashboards:
    ${dashboards.slice(0, 50).map(d => 
      `- ID: ${d.id} | Name: ${d.name}`
    ).join('\n')}${dashboards.length > 50 ? `\n... and ${dashboards.length - 50} more dashboards` : ''}`,
            },
          ],
        };
      }
  • The schema definition for the list_dashboards tool, specifying its name, description, and empty input schema (no parameters required). This is part of the TOOL_DEFINITIONS array used for tool discovery.
    {
      name: 'list_dashboards',
      description: '๐Ÿ“Š [SAFE] List all dashboards in Metabase. Use this to discover available dashboards or find dashboards by name. Risk: None - read-only operation.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • The registration/dispatch point in the executeTool switch statement that maps the 'list_dashboards' tool name to the dashboardHandlers.listDashboards() method.
    case 'list_dashboards':
      return await this.dashboardHandlers.listDashboards();
  • Instantiation of the DashboardHandlers class, which contains the listDashboards method, making it available for tool execution.
    this.dashboardHandlers = new DashboardHandlers(this.apiClient);
  • Import of the DashboardHandlers class containing the tool handler.
    import { DashboardHandlers } from './handlers/dashboardHandlers.js';

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