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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:880-903 (handler)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