metabase-ai-assistant
v3.2.0MCP Server for Metabase - 111 tools for SQL generation, dashboards & PostgreSQL
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
db_list
Get list of all databases in Metabase instance with IDs and connection types
db_test_speed
Check database response time and performance - run this before heavy operations to determine optimal timeout settings
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to test |
db_schemas
Get all schema names in specified database - useful for data exploration and finding business data locations
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
db_tables
Get comprehensive table list across all schemas with field counts - provides overview of data structure
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
sql_execute
Run SQL queries against database - supports SELECT, DDL with security controls, returns formatted results
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to execute query against |
sql * | string | SQL query to execute |
mb_question_create
Create new question/chart
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to query |
description * | string | Description of what the question shows |
name * | string | Name for the question |
sql * | string | SQL query for the question |
collection_id | number | Collection ID to save the question to (optional) |
mb_questions
Browse saved questions and charts in Metabase - filter by collection to find specific reports
| Parameter | Type | Description |
|---|---|---|
collection_id | number | Filter by collection ID (optional) |
mb_dashboard_create
Create a new dashboard in Metabase with layout options
| Parameter | Type | Description |
|---|---|---|
description * | string | Dashboard description |
name * | string | Dashboard name |
collection_id | number | Collection ID to save dashboard to (optional) |
template | string | Dashboard template type |
width | number | Dashboard width in grid units (default: 12) |
mb_dashboard_template_executive
Create an executive dashboard with standard KPIs, metrics, and layout - auto-generates questions and arranges them professionally
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to analyze and create dashboard for |
name * | string | Dashboard name |
business_domain | string | Business domain (e.g., ecommerce, saas, retail, finance) |
collection_id | number | Collection ID to save dashboard to (optional) |
schema_name | string | Target schema name for analysis (optional) |
time_period | string | Default time period for metrics |
mb_dashboards
List existing dashboards
mb_question_create_parametric
Create a parametric question with filters, variables, and dynamic queries - supports date ranges, dropdowns, and field filters
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
name * | string | Question name |
sql * | string | SQL query with parameter placeholders (e.g., {{date_range}}, {{category_filter}}) |
collection_id | number | Collection ID to save question to (optional) |
description | string | Question description |
parameters | array | Parameter definitions for the question |
visualization | string | Chart type |
mb_dashboard_add_card
Add a question card to a dashboard with specific positioning, sizing, and layout
| Parameter | Type | Description |
|---|---|---|
dashboard_id * | number | Dashboard ID to add card to |
question_id * | number | Question ID to add as card |
parameter_mappings | array | Connect dashboard filters to question parameters |
position | object | Card position and size on dashboard grid |
web_fetch_metabase_docs
Fetch specific Metabase documentation page for API details, best practices, and feature information
| Parameter | Type | Description |
|---|---|---|
topic * | string | Documentation topic to fetch (e.g., "dashboard-api", "questions", "parameters", "charts") |
search_terms | string | Specific terms to search in documentation |
web_explore_metabase_docs
Comprehensively explore Metabase documentation - crawls main docs and discovers all available sections, APIs, and guides
| Parameter | Type | Description |
|---|---|---|
depth | number | Crawling depth (1=main sections, 2=subsections, 3=deep crawl) |
focus_areas | array | Specific areas to focus on during exploration |
include_examples | boolean | Include code examples and API samples |
web_search_metabase_docs
Search across all Metabase documentation for specific topics, APIs, or solutions - uses intelligent content analysis
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query (e.g., "dashboard API create card", "parameter filters", "embedding iframe") |
doc_type | string | Type of documentation to prioritize |
max_results | number | Maximum number of relevant pages to return |
web_metabase_api_reference
Get comprehensive Metabase API reference with endpoints, parameters, examples, and response formats
| Parameter | Type | Description |
|---|---|---|
auth_info | boolean | Include authentication and permission details |
endpoint_category | string | API category to explore |
include_examples | boolean | Include request/response examples |
mb_metric_create
Create a custom metric definition in Metabase for KPI tracking and business intelligence
| Parameter | Type | Description |
|---|---|---|
aggregation * | object | Metric aggregation definition |
description * | string | Metric description and business context |
name * | string | Metric name |
table_id * | number | Base table ID for the metric |
filters | array | Optional filters to apply to metric calculation |
mb_dashboard_add_filter
Add a filter to a dashboard for interactive data filtering across multiple cards
| Parameter | Type | Description |
|---|---|---|
dashboard_id * | number | Dashboard ID to add filter to |
name * | string | Filter display name |
type * | string | Filter type and operator |
default_value | Default filter value (optional) | |
field_id | number | Field ID to filter on (optional for some filter types) |
position | object | Filter position in dashboard header |
required | boolean | Whether filter is required |
mb_dashboard_layout_optimize
Automatically optimize dashboard layout for better visual hierarchy and user experience
| Parameter | Type | Description |
|---|---|---|
dashboard_id * | number | Dashboard ID to optimize |
grid_width | number | Dashboard grid width (default: 12) |
layout_style | string | Layout optimization style |
preserve_order | boolean | Keep existing card order when optimizing |
mb_auto_describe
Automatically generate AI-powered descriptions for databases, tables, and fields with timestamp signatures
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to generate descriptions for |
force_update | boolean | Update existing descriptions (default: false) |
target_type | string | What to generate descriptions for |
ai_sql_generate
Convert natural language requests into SQL queries - understands business context and table relationships
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to generate query for |
description * | string | Natural language description of what you want to query |
ai_sql_optimize
Analyze and improve SQL query performance - suggests indexes, query restructuring, and execution optimizations
| Parameter | Type | Description |
|---|---|---|
sql * | string | SQL query to optimize |
ai_sql_explain
Break down complex SQL queries into plain English - explains joins, aggregations, and business logic
| Parameter | Type | Description |
|---|---|---|
sql * | string | SQL query to explain |
db_connection_info
Get database connection information from Metabase (requires admin permissions)
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to get connection info for |
db_table_create
Create new table directly in database with security controls - requires schema selection and approval
| Parameter | Type | Description |
|---|---|---|
columns * | array | Array of column definitions |
database_id * | number | Database ID to create table in |
table_name * | string | Table name (claude_ai_ prefix will be added automatically) |
approved | boolean | Set to true to confirm execution |
dry_run | boolean | Set to true to preview without executing |
schema | string | Target schema name (optional, uses database default if not specified) |
db_view_create
Create a new view directly in the database (with claude_ai_ prefix)
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to create view in |
select_sql * | string | SELECT statement for the view |
view_name * | string | View name (claude_ai_ prefix will be added automatically) |
approved | boolean | Set to true to confirm execution |
dry_run | boolean | Set to true to preview without executing |
schema | string | Target schema name (optional, uses database default if not specified) |
db_matview_create
Create a new materialized view directly in the database (PostgreSQL only)
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to create materialized view in |
select_sql * | string | SELECT statement for the materialized view |
view_name * | string | Materialized view name (claude_ai_ prefix will be added) |
approved | boolean | Set to true to confirm execution |
dry_run | boolean | Set to true to preview without executing |
schema | string | Target schema name (optional, uses database default if not specified) |
db_index_create
Create database index for query performance - improves search and join operations on specified columns
| Parameter | Type | Description |
|---|---|---|
columns * | array | Array of column names or single column name |
database_id * | number | Database ID to create index in |
index_name * | string | Index name (claude_ai_ prefix will be added automatically) |
table_name * | string | Table name to create index on |
approved | boolean | Set to true to confirm execution |
dry_run | boolean | Set to true to preview without executing |
unique | boolean | Whether to create unique index |
db_table_ddl
Get the DDL (CREATE statement) for a table
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
table_name * | string | Table name to get DDL for |
db_view_ddl
Get the DDL (CREATE statement) for a view
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
view_name * | string | View name to get DDL for |
db_ai_list
List all database objects created by AI (with claude_ai_ prefix)
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to list objects from |
db_ai_drop
Safely remove AI-created database objects - only works on objects with claude_ai_ prefix for security
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
object_name * | string | Object name to drop (must have claude_ai_ prefix) |
object_type * | string | Type of object to drop |
approved | boolean | Set to true to confirm deletion |
dry_run | boolean | Set to true to preview without executing |
db_schema_explore
Fast schema exploration with table counts and basic info - lightweight method for discovering data structure
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
schema_name * | string | Schema name to explore |
limit | number | Maximum number of tables to return (default: 20) |
db_test_speed
Quick test to check database connection and response time
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to test |
db_schema_analyze
Deep schema analysis with column details, keys, constraints - requires direct DB connection for comprehensive insights
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
schema_name * | string | Schema name to explore |
include_columns | boolean | Include detailed column information |
limit | number | Maximum number of tables to analyze (default: 10) |
timeout_seconds | number | Maximum execution time in seconds (default: 30) |
db_relationships_detect
Detect existing foreign key relationships between tables - finds explicitly defined database constraints
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
schema_name * | string | Schema name to analyze |
table_names | array | Specific tables to analyze (optional, analyzes all if not provided) |
ai_relationships_suggest
AI-powered virtual relationship discovery using naming patterns and data analysis - finds implicit connections between tables
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
schema_name * | string | Schema name |
confidence_threshold | number | Minimum confidence level (0.0-1.0) |
mb_relationships_create
Create virtual relationships in Metabase model - enables cross-table queries and improved dashboard capabilities
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
relationships * | array | Array of confirmed relationships to create |
confirmed | boolean | Confirm that relationships have been reviewed |
activity_log_init
Initialize activity logging system for a database - creates log table and starts tracking operations
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to initialize logging for |
schema | string | Schema name for log table (default: public) |
activity_session_summary
Get comprehensive summary of current or specified session activities and performance
| Parameter | Type | Description |
|---|---|---|
session_id | string | Session ID to analyze (optional, defaults to current session) |
activity_operation_stats
Analyze operation statistics and patterns over specified time period
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days to analyze (default: 7) |
activity_database_usage
Get database usage patterns and statistics showing which databases are most active
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days to analyze (default: 30) |
activity_error_analysis
Analyze error patterns and common failure points to identify improvement opportunities
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days to analyze (default: 7) |
activity_performance_insights
Get performance insights showing slow operations and optimization opportunities
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days to analyze (default: 7) |
activity_timeline
Get chronological timeline of recent activities for debugging and monitoring
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days to show (default: 7) |
limit | number | Maximum number of activities to return (default: 100) |
activity_cleanup
Clean up old activity logs to maintain performance and storage efficiency
| Parameter | Type | Description |
|---|---|---|
dry_run | boolean | Preview what would be deleted without actually deleting |
retention_days | number | Keep logs newer than this many days (default: 90) |
definition_tables_init
Initialize definition lookup tables system for documentation, metrics, templates, and search
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to create definition tables in |
definition_search_terms
Search business terms and definitions with relevance ranking
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to search in |
search_term * | string | Term to search for in definitions |
category | string | Optional category filter (customer_metrics, revenue_metrics, etc.) |
definition_get_metric
Get metric definition with calculation formula and business context
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to search in |
metric_name * | string | Metric name to lookup |
definition_get_template
Get dashboard or question template with layout and configuration
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to search in |
template_name * | string | Template name to lookup |
template_type * | string | Type of template to retrieve |
definition_global_search
Search across all definition tables with unified results
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to search in |
search_term * | string | Term to search across all definitions |
content_types | array | Filter by content types (business_terms, metrics, templates, etc.) |
parametric_question_create
Create parametric question with date, text search, and category filters
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to create question in |
name * | string | Question name |
parameters * | object | Parameter definitions with types and defaults |
sql_template * | string | SQL template with parameter placeholders (e.g., {{date_range}}, {{search_term}}) |
collection_id | number | Collection ID to save question to |
description | string | Question description |
question_type | string |
parametric_dashboard_create
Create dashboard with parametric questions and shared filters
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to create dashboard in |
name * | string | Dashboard name |
questions * | array | Array of question configurations |
collection_id | number | Collection ID to save dashboard to |
description | string | Dashboard description |
filters | object | Dashboard-level filters |
layout | array | Layout configuration for questions |
parametric_template_preset
Create parametric question from preset templates (date range analysis, category filter, text search, period comparison)
| Parameter | Type | Description |
|---|---|---|
config * | object | Configuration for the preset template |
database_id * | number | Database ID to create question in |
preset_type * | string | Preset template type |
collection_id | number | Collection ID to save question to |
db_vacuum_analyze
Run VACUUM and ANALYZE on PostgreSQL tables to optimize storage and update statistics (PostgreSQL only)
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
dry_run | boolean | Preview command without executing |
schema_name | string | Schema name (default: public) |
table_name | string | Table name to vacuum/analyze (optional, all tables if not specified) |
vacuum_type | string | Type of maintenance operation |
db_query_explain
Get execution plan for a SQL query - shows how PostgreSQL will execute the query
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
sql * | string | SQL query to analyze |
analyze | boolean | Actually run the query to get real execution times |
format | string | Output format for the plan |
verbose | boolean | Include additional details in the plan |
db_table_stats
Get table statistics including row count, size, dead tuples, last vacuum/analyze times
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
table_name * | string | Table name to get stats for |
schema_name | string | Schema name (default: public) |
db_index_usage
Analyze index usage statistics - find unused or rarely used indexes
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
min_size_mb | number | Minimum index size in MB to include |
schema_name | string | Schema name to analyze (default: public) |
mb_visualization_settings
Get or update visualization settings for a question (chart type, colors, labels, etc.)
| Parameter | Type | Description |
|---|---|---|
question_id * | number | Question ID to get/update visualization for |
display | string | Chart display type |
settings | object | Visualization settings object |
mb_visualization_recommend
AI-powered visualization recommendation based on query results and data types
| Parameter | Type | Description |
|---|---|---|
question_id * | number | Question ID to analyze |
data_sample | object | Sample data to analyze (optional if question_id provided) |
purpose | string | Purpose of the visualization |
mb_collection_create
Create a new collection in Metabase for organizing questions and dashboards
| Parameter | Type | Description |
|---|---|---|
name * | string | Collection name |
color | string | Collection color (hex code) |
description | string | Collection description |
parent_id | number | Parent collection ID (null for root level) |
mb_collection_list
List all collections with hierarchy and item counts
| Parameter | Type | Description |
|---|---|---|
include_items | boolean | Include items in each collection |
parent_id | number | Filter by parent collection ID (null for root) |
mb_collection_move
Move questions, dashboards, or collections to a different collection
| Parameter | Type | Description |
|---|---|---|
item_id * | number | ID of the item to move |
item_type * | string | Type of item to move |
target_collection_id * | number | Target collection ID (null for root) |
mb_action_create
Create a Metabase Action for data modification (INSERT, UPDATE, DELETE)
| Parameter | Type | Description |
|---|---|---|
model_id * | number | Model ID the action belongs to |
name * | string | Action name |
type * | string | Action type |
database_id | number | Database ID for query actions |
dataset_query | object | Query definition for query actions |
description | string | Action description |
parameters | array | Action parameters |
visualization_settings | object | Form visualization settings |
mb_action_list
List all actions for a model
| Parameter | Type | Description |
|---|---|---|
model_id * | number | Model ID to get actions for |
mb_action_execute
Execute a Metabase action with parameters
| Parameter | Type | Description |
|---|---|---|
action_id * | number | Action ID to execute |
parameters * | object | Parameter values for the action |
mb_alert_create
Create an alert for a question that triggers on specified conditions
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Question/Card ID to create alert for |
alert_above_goal | boolean | Alert when above goal (for goal condition) |
alert_condition | string | Alert condition type |
alert_first_only | boolean | Only alert on first occurrence |
channels | array | Notification channels |
mb_alert_list
List all alerts, optionally filtered by question
| Parameter | Type | Description |
|---|---|---|
card_id | number | Filter alerts by question ID (optional) |
mb_pulse_create
Create a scheduled report (pulse) that sends dashboards/questions on a schedule
| Parameter | Type | Description |
|---|---|---|
cards * | array | Cards to include in the pulse |
channels * | array | Delivery channels (email/slack) |
name * | string | Pulse name |
collection_id | number | Collection to save pulse in |
skip_if_empty | boolean | Skip sending if no results |
mb_field_metadata
Get or update field metadata including display name, description, and semantic type
| Parameter | Type | Description |
|---|---|---|
field_id * | number | Field ID to get/update |
description | string | Field description |
display_name | string | Human-readable display name |
has_field_values | string | How to show field values in filters |
semantic_type | string | Semantic type for the field |
visibility_type | string | Field visibility |
mb_table_metadata
Get or update table metadata including display name, description, and visibility
| Parameter | Type | Description |
|---|---|---|
table_id * | number | Table ID to get/update |
description | string | Table description |
display_name | string | Human-readable display name |
visibility_type | string | Table visibility type |
mb_field_values
Get distinct values for a field (for filter dropdowns)
| Parameter | Type | Description |
|---|---|---|
field_id * | number | Field ID to get values for |
mb_embed_url_generate
Generate signed embedding URL for a dashboard or question
| Parameter | Type | Description |
|---|---|---|
resource_id * | number | ID of the dashboard or question |
resource_type * | string | Type of resource to embed |
bordered | boolean | Show border around embed |
exp_minutes | number | Token expiration in minutes |
params | object | Locked parameter values for the embedding |
preview | boolean | Include preview-mode frame styles |
theme | string | Embed theme |
titled | boolean | Show title in embed |
mb_embed_settings
Get embedding settings and enabled features for the Metabase instance
mb_user_list
List all Metabase users with filtering options
| Parameter | Type | Description |
|---|---|---|
group_id | number | Filter by permission group ID (optional) |
status | string | Filter by user status |
mb_user_get
Get detailed information about a specific user
| Parameter | Type | Description |
|---|---|---|
user_id * | number | User ID to retrieve |
mb_user_create
Create a new Metabase user
| Parameter | Type | Description |
|---|---|---|
email * | string | User email address (also used as login) |
first_name * | string | User first name |
last_name * | string | User last name |
group_ids | array | Array of permission group IDs to assign |
password | string | Initial password (optional, will send invite email if not provided) |
mb_user_update
Update an existing user
| Parameter | Type | Description |
|---|---|---|
user_id * | number | User ID to update |
email | string | New email address |
first_name | string | New first name |
group_ids | array | New permission group IDs |
is_superuser | boolean | Set superuser status |
last_name | string | New last name |
mb_user_disable
Disable (deactivate) a user account
| Parameter | Type | Description |
|---|---|---|
user_id * | number | User ID to disable |
mb_permission_group_list
List all permission groups in Metabase
mb_permission_group_create
Create a new permission group
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the permission group |
mb_permission_group_delete
Delete a permission group
| Parameter | Type | Description |
|---|---|---|
group_id * | number | Group ID to delete |
mb_permission_group_add_user
Add a user to a permission group
| Parameter | Type | Description |
|---|---|---|
group_id * | number | Permission group ID |
user_id * | number | User ID to add |
mb_permission_group_remove_user
Remove a user from a permission group
| Parameter | Type | Description |
|---|---|---|
group_id * | number | Permission group ID |
user_id * | number | User ID to remove |
mb_collection_permissions_get
Get permissions graph for a collection
| Parameter | Type | Description |
|---|---|---|
collection_id * | number | Collection ID (use "root" for root collection) |
mb_collection_permissions_update
Update permissions for a collection
| Parameter | Type | Description |
|---|---|---|
collection_id * | number | Collection ID |
group_id * | number | Permission group ID |
permission * | string | Permission level to set |
mb_card_get
Get detailed information about a specific card/question
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Card/Question ID |
mb_card_update
Update an existing card/question
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Card/Question ID |
collection_id | number | Move to collection ID |
description | string | New description |
display | string | Chart type |
name | string | New name |
visualization_settings | object | New visualization settings |
mb_card_delete
Permanently delete a card/question
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Card/Question ID to delete |
mb_card_archive
Archive a card/question (soft delete)
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Card/Question ID to archive |
mb_card_data
Execute a card/question and get the results in specified format
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Card/Question ID |
format | string | Output format |
parameters | object | Optional parameters for parametric questions |
mb_dashboard_get
Get detailed information about a dashboard
| Parameter | Type | Description |
|---|---|---|
dashboard_id * | number | Dashboard ID |
mb_dashboard_update
Update dashboard properties
| Parameter | Type | Description |
|---|---|---|
dashboard_id * | number | Dashboard ID |
collection_id | number | Move to collection |
description | string | New description |
enable_embedding | boolean | Enable embedding |
name | string | New name |
mb_dashboard_delete
Delete a dashboard
| Parameter | Type | Description |
|---|---|---|
dashboard_id * | number | Dashboard ID to delete |
mb_dashboard_card_update
Update card position and size on a dashboard
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Dashboard card ID |
dashboard_id * | number | Dashboard ID |
col | number | New column position |
row | number | New row position |
size_x | number | Width in grid units |
size_y | number | Height in grid units |
mb_dashboard_card_remove
Remove a card from a dashboard
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Dashboard card ID to remove |
dashboard_id * | number | Dashboard ID |
mb_card_copy
Copy a card/question to a new location
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Source card ID |
collection_id | number | Destination collection ID |
new_name | string | Name for the copy (optional, defaults to "Copy of [original]") |
mb_card_clone
Clone a card and retarget to a different table (for template cards)
| Parameter | Type | Description |
|---|---|---|
card_id * | number | Source card ID |
target_table_id * | number | New target table ID |
collection_id | number | Destination collection ID |
column_mappings | object | Column name mappings from source to target table |
mb_dashboard_copy
Copy a dashboard with all its cards
| Parameter | Type | Description |
|---|---|---|
dashboard_id * | number | Source dashboard ID |
collection_id | number | Destination collection ID |
deep_copy | boolean | If true, also copies all cards. If false, links to existing cards. |
new_name | string | Name for the copy |
mb_collection_copy
Copy an entire collection with all contents
| Parameter | Type | Description |
|---|---|---|
collection_id * | number | Source collection ID |
destination_id | number | Destination parent collection ID |
new_name | string | Name for the copy |
mb_search
Search across all Metabase items (cards, dashboards, collections, tables)
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query text |
collection_id | number | Search within specific collection |
limit | number | Maximum results to return |
models | array | Filter by item types (default: all) |
mb_segment_create
Create a segment (reusable filter) for a table
| Parameter | Type | Description |
|---|---|---|
definition * | object | MBQL filter definition |
name * | string | Segment name |
table_id * | number | Table ID to create segment for |
description | string | Segment description |
mb_segment_list
List all segments
| Parameter | Type | Description |
|---|---|---|
table_id | number | Filter by table ID (optional) |
mb_bookmark_create
Bookmark an item for quick access
| Parameter | Type | Description |
|---|---|---|
id * | number | Item ID to bookmark |
type * | string | Item type to bookmark |
mb_bookmark_list
List all bookmarked items
mb_bookmark_delete
Remove a bookmark
| Parameter | Type | Description |
|---|---|---|
id * | number | Item ID |
type * | string | Item type |
db_sync_schema
Trigger schema sync for a database
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to sync |
mb_cache_invalidate
Invalidate cache for specific items or entire database
| Parameter | Type | Description |
|---|---|---|
card_id | number | Specific card ID to invalidate |
database_id | number | Database ID (optional, invalidates all if provided alone) |
mb_meta_query_performance
Get comprehensive query performance statistics from Metabase metadata - analyze execution times, cache hit rates, error rates, and identify slow queries. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days to analyze (default: 7) |
include_slow_queries | boolean | Include detailed slow query analysis (default: true) |
slow_threshold_ms | number | Threshold for slow queries in milliseconds (default: 10000) |
mb_meta_content_usage
Analyze content usage patterns - find popular questions/dashboards, unused content, orphaned cards. Great for content cleanup and optimization. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days to analyze (default: 30) |
limit | number | Number of top items to return (default: 20) |
unused_threshold_days | number | Days without usage to consider content "unused" (default: 90) |
mb_meta_user_activity
Get user activity statistics - active users, inactive users, query patterns, login history. Useful for license optimization and user engagement analysis. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days to analyze (default: 30) |
inactive_threshold_days | number | Days without activity to consider user "inactive" (default: 90) |
include_login_history | boolean | Include login timeline data (default: true) |
mb_meta_database_usage
Analyze database usage patterns - query counts, performance, errors by database and table. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
database_id | number | Optional: analyze specific database tables |
days | number | Number of days to analyze (default: 30) |
mb_meta_dashboard_complexity
Analyze dashboard complexity - card counts, load times, performance issues. Identify dashboards that need optimization. Requires MB_METADATA_ENABLED=true.
mb_meta_info
Get overview of Metabase metadata database - active users, questions, dashboards, recent activity. Quick health check. Requires MB_METADATA_ENABLED=true.
mb_meta_table_dependencies
Analyze table dependencies - find all questions and dashboards that depend on a specific table. Essential for impact analysis before schema changes. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID containing the table |
table_name * | string | Name of the table to analyze |
schema_name | string | Schema name (optional, recommended for disambiguation) |
mb_meta_impact_analysis
Analyze impact of removing a table - breaking changes, affected questions/dashboards, severity assessment, and recommendations. Critical for safe database migrations. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID |
table_name * | string | Table name to analyze for removal impact |
schema_name | string | Schema name (optional) |
mb_meta_optimization_recommendations
Get comprehensive optimization recommendations - index suggestions, materialized view candidates, and cache optimization. Data-driven performance improvements. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
database_id * | number | Database ID to analyze |
days | number | Number of days to analyze (default: 30) |
include_cache_recommendations | boolean | Include cache optimization suggestions (default: true) |
include_matview_candidates | boolean | Include materialized view recommendations (default: true) |
mb_meta_error_patterns
Analyze error patterns and categorize recurring errors - identify systemic issues, suggest resolutions, find questions with high error rates. Proactive error management. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days to analyze (default: 30) |
include_recurring_questions | boolean | Include questions with recurring errors (default: true) |
include_timeline | boolean | Include temporal error analysis (default: true) |
mb_meta_export_workspace
📤 Export workspace to JSON (questions, dashboards, collections). READ-ONLY operation - safe to execute. Perfect for backups and migrations. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
archived | boolean | Include archived items (default: false) |
collection_ids | array | Optional: Export specific collections only (array of IDs) |
include_collections | boolean | Include collections (default: true) |
include_dashboards | boolean | Include dashboards (default: true) |
include_questions | boolean | Include questions (default: true) |
mb_meta_import_preview
🔍 Preview import impact WITHOUT making changes (dry-run). Analyzes conflicts, detects issues, provides recommendations. ALWAYS run this before actual import. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
workspace * | object | Workspace data from export_workspace |
mb_meta_compare_environments
🔄 Compare current environment with another (dev → staging → prod). Identifies drift, missing items, and differences. READ-ONLY operation. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
target_workspace * | object | Workspace export from target environment |
mb_meta_auto_cleanup
🧹 Auto-cleanup unused content with SAFETY CHECKS. ⚠️ DRY-RUN by default, requires approved:true for execution. Finds unused questions (180+ days), orphaned cards, empty collections, broken questions. Requires MB_METADATA_ENABLED=true.
| Parameter | Type | Description |
|---|---|---|
approved | boolean | 🔒 SAFETY: Requires explicit approval (default: false). Set true to execute |
broken_questions | boolean | Include questions with 100% error rate (default: true) |
dry_run | boolean | 🔒 SAFETY: Dry-run mode (default: true). Set false to execute |
empty_collections | boolean | Include empty collections (default: true) |
orphaned_cards | boolean | Include orphaned cards (not in dashboards) (default: true) |
unused_days | number | Days without usage to consider content unused (default: 180) |