Skip to main content
Glama
voducdan

metabase-mcp

by voducdan

list_dashboards

Retrieve a list of all Metabase dashboards with their IDs, names, descriptions, collection IDs, and creator details.

Instructions

List all dashboards in Metabase.

Returns: A list of dashboards with their metadata including id, name, description, collection_id, and creator info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual MCP tool handler function for 'list_dashboards'. It is decorated with @mcp.tool (line 884), which also serves as its registration. The function makes a GET request to Metabase's /api/dashboard endpoint, logs the results, and returns the list of dashboards.
    # =============================================================================
    # Tool Definitions - Dashboard Operations
    # =============================================================================
    
    @mcp.tool
    async def list_dashboards(ctx: Context) -> list[dict[str, Any]]:
        """
        List all dashboards in Metabase.
    
        Returns:
            A list of dashboards with their metadata including id, name,
            description, collection_id, and creator info.
        """
        try:
            await ctx.info("Fetching list of dashboards from Metabase")
            result = await metabase_client.request("GET", "/dashboard")
            dashboard_count = len(result) if isinstance(result, list) else len(result.get("data", []))
            await ctx.info(f"Successfully retrieved {dashboard_count} dashboards")
            return result
        except Exception as e:
            error_msg = f"Error listing dashboards: {e}"
            await ctx.error(error_msg)
            raise ToolError(error_msg) from e
  • server.py:884-884 (registration)
    The @mcp.tool decorator on line 884 registers 'list_dashboards' as a FastMCP tool. The function name (list_dashboards) becomes the tool name exposed via MCP.
    @mcp.tool

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations provided, but the description adds useful metadata about the return list (id, name, description, etc.). However, no disclosure of potential side effects, permissions, or performance considerations.

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

Conciseness4/5

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

Two concise sentences, front-loaded with the main purpose. Could be slightly tighter, but no redundant information.

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 simple tool with no parameters and an output schema, the description adequately covers purpose and return format. However, missing usage context like whether it requires authentication or handles large result sets.

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?

Zero parameters with 100% schema coverage; the description adds value by explaining the return fields, which the schema doesn't specify. This is informative beyond the schema.

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 'List all dashboards' with a specific verb and resource, distinguishing it from siblings like list_cards and list_collections which list different entities.

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

Usage Guidelines3/5

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

No explicit guidance on when or when not to use this tool. The description implies a simple listing use case, but lacks exclusions or alternatives.

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