Skip to main content
Glama
MikelA92

Metabase MCP Server

by MikelA92

get_dashboard

Retrieve a Metabase dashboard by ID to view its structure, cards, layout, and parameters for analysis or documentation purposes.

Instructions

📊 [SAFE] Get a dashboard by ID including all its cards, layout, and parameters. Use this to understand dashboard structure or see all questions in a dashboard at once. Risk: None - read-only operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dashboardIdYesThe ID of the dashboard to retrieve

Implementation Reference

  • The getDashboard method in DashboardHandlers class that validates the dashboardId, fetches dashboard details and cards from Metabase API, formats the information into a markdown text block, and returns it as tool content.
      async getDashboard(dashboardId) {
        Validators.validateDashboardId(dashboardId);
        
        this.logger.debug('Getting dashboard', { dashboardId });
        const dashboard = await this.apiClient.makeRequest(`/api/dashboard/${dashboardId}`);
        
        const cards = dashboard.dashcards?.map(dc => ({
          cardId: dc.card_id,
          cardName: dc.card?.name,
          row: dc.row,
          col: dc.col,
        })) || [];
    
        return {
          content: [
            {
              type: 'text',
              text: `Dashboard Information:
    ID: ${dashboard.id}
    Name: ${dashboard.name}
    Description: ${dashboard.description || 'No description'}
    Created: ${dashboard.created_at}
    Updated: ${dashboard.updated_at}
    Number of Cards: ${cards.length}
    
    Cards in Dashboard:
    ${cards.map(c => `- Card ${c.cardId}: ${c.cardName} (Row: ${c.row}, Col: ${c.col})`).join('\n')}`,
            },
          ],
        };
      }
  • The tool definition including name, description, and input schema requiring a dashboardId integer.
      name: 'get_dashboard',
      description: '📊 [SAFE] Get a dashboard by ID including all its cards, layout, and parameters. Use this to understand dashboard structure or see all questions in a dashboard at once. Risk: None - read-only operation.',
      inputSchema: {
        type: 'object',
        properties: {
          dashboardId: {
            type: 'integer',
            description: 'The ID of the dashboard to retrieve',
            minimum: 1,
          },
        },
        required: ['dashboardId'],
      },
    },
  • Tool dispatch registration in the executeTool switch statement that calls the dashboardHandlers.getDashboard with the provided dashboardId argument.
    case 'get_dashboard':
      return await this.dashboardHandlers.getDashboard(args.dashboardId);
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by explicitly stating 'read-only operation' and 'Risk: None', which informs the agent about safety. It also mentions what gets returned ('cards, layout, and parameters'), though it could provide more detail on response format or limitations.

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 efficiently structured with three sentences: purpose, usage context, and risk disclosure. Each sentence adds value without redundancy, and it's appropriately front-loaded with the core functionality.

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?

For a single-parameter read-only tool with no output schema, the description provides good context about what's returned and safety. However, it could be more complete by mentioning potential error cases or response structure, though the absence of an output schema doesn't severely penalize it.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents the single parameter (dashboardId). The description adds no additional parameter information beyond what's in the schema, maintaining the baseline score of 3 for adequate but no extra value.

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 specific action ('Get a dashboard by ID') and resource ('including all its cards, layout, and parameters'), distinguishing it from siblings like list_dashboards (which lists multiple dashboards) and get_card (which retrieves individual cards). The mention of 'all its cards' provides clear differentiation.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('to understand dashboard structure or see all questions in a dashboard at once'), providing clear context for its application. It distinguishes from siblings by focusing on comprehensive dashboard retrieval rather than listing or partial views.

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