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
| Name | Required | Description | Default |
|---|---|---|---|
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: {}, }, },
- src/server/MetabaseMCPServer.js:182-183 (registration)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();
- src/server/MetabaseMCPServer.js:38-38 (registration)Instantiation of the DashboardHandlers class, which contains the listDashboards method, making it available for tool execution.this.dashboardHandlers = new DashboardHandlers(this.apiClient);
- src/server/MetabaseMCPServer.js:10-10 (registration)Import of the DashboardHandlers class containing the tool handler.import { DashboardHandlers } from './handlers/dashboardHandlers.js';