The Metabase connector lets your AI agent act in each user's Metabase account. Each user connects their own Metabase API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 77 tools.
- Tools
- 77
- What they doRead · write · destructive
- 42 · 30 · 542 read30 write5 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Metabase connection
In AgentKit > Connections, create a Metabase connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'metabase'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Metabase:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'metabase_actions_list',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "metabase"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Metabase:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="metabase_actions_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Metabase credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolmetabase_action_getGet one action by ID.Read-onlyGet Action
Get one action by ID. Returns id, name, type, model_id, parameters (the inputs it expects), and its query or implicit kind. Use this to see which parameters metabase_action_execute needs.
Inputs
action_idintegerrequired- ID of the action, from metabase_actions_list.
metabase_actions_listList actions (saved inserts, updates, deletes, or custom SQL writes defined on models).Read-onlyList Actions
List actions (saved inserts, updates, deletes, or custom SQL writes defined on models). Returns an array of actions with id, name, type, model_id, and parameters. Use metabase_action_execute to run one. Actions must be enabled on the database.
Inputs
model_idinteger- Only actions defined on this model (card) ID.
metabase_card_dashboards_listList the dashboards that contain a card.Read-onlyList Card Dashboards
List the dashboards that contain a card. Returns an array of {id, name} pairs. Use this before changing or deleting a card to see where it is used.
Inputs
card_idintegerrequired- ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.
metabase_card_getGet one card (saved question, model, or metric) by ID.Read-onlyGet Card
Get one card (saved question, model, or metric) by ID. Returns the card's name, type, display, description, collection, parameters, visualization settings, and dataset_query. Use this to inspect a card's query before running or editing it; use metabase_card_query to get its results.
Inputs
card_idintegerrequired- ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.
legacy_mbqlboolean- Set to true to return dataset_query in the legacy MBQL 4 format (Metabase 57+ returns MBQL 5 by default). Useful when copying the query into a new card.
metabase_card_query_metadata_getGet the metadata needed to work with a card's query: its databases, tables, and fields.Read-onlyGet Card Query Metadata
Get the metadata needed to work with a card's query: its databases, tables, and fields. Returns databases, tables (with fields and their types), and fields. Use this to learn which columns a card's query can filter or group by.
Inputs
card_idintegerrequired- ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.
metabase_cards_listList saved questions, models, and metrics (cards) the API key can see, optionally filtered.Read-onlyList Cards
List saved questions, models, and metrics (cards) the API key can see, optionally filtered. Returns an array of cards with id, name, type, display, collection, database_id, and dataset_query. Use this to browse cards by filter; use metabase_search to find cards by name, and metabase_card_get for one card.
Inputs
fstring- Which cards to return: all (default), mine, bookmarked, database, table, using_model, using_segment, or archived. The database, table, using_model, and using_segment filters need model_id.one of
allminebookmarkeddatabasetableusing_modelusing_segmentarchived model_idinteger- ID used by the filter: the database ID for f=database, the table ID for f=table, the model card ID for f=using_model, or the segment ID for f=using_segment.
metabase_collection_getGet one collection's details by ID, or the root collection with 'root'.Read-onlyGet Collection
Get one collection's details by ID, or the root collection with 'root'. Returns id, name, description, location, effective_ancestors, can_write, and archived. Use metabase_collection_items_list to see what the collection contains.
Inputs
collection_idstringrequired- ID of the collection, or 'root' for the root collection ('Our analytics').
metabase_collection_items_listList the items (questions, models, metrics, dashboards, sub-collections, and more) in a collection, with paging.Read-onlyList Collection Items
List the items (questions, models, metrics, dashboards, sub-collections, and more) in a collection, with paging. Returns data (each item's id, name, model, description, and last-edit info), total, limit, and offset. Use this to browse a folder; use metabase_search to find items by name across all collections.
Inputs
collection_idstringrequired- ID of the collection, or 'root' for top-level items.
archivedboolean- Set true to return archived (trashed) items instead of active ones.
limitinteger- Maximum number of items to return (page size).
modelsarray- Only return these item types: card (question), dataset (model), metric, dashboard, collection, pulse, snippet, timeline, document, table, or no_models. Leave empty for all types.
offsetinteger- Number of items to skip, for paging.
pinned_statestring- Pinned filter: all (default), is_pinned, or is_not_pinned.one of
allis_pinnedis_not_pinned sort_columnstring- Sort by name, last_edited_at, last_edited_by, model, or description.one of
namelast_edited_atlast_edited_bymodeldescription sort_directionstring- Sort direction: asc or desc.one of
ascdesc
metabase_collection_timelines_listList the timelines that belong to one collection (or the root collection).Read-onlyList Collection Timelines
List the timelines that belong to one collection (or the root collection). Returns an array of timelines, with their events when include=events. Use metabase_timelines_list for timelines across all collections.
Inputs
collection_idstringrequired- ID of the collection, or 'root' for the root collection.
archivedboolean- Set true to list archived timelines instead of active ones.
includestring- Set to events to include each timeline's events.one of
events
metabase_collection_tree_getGet collections as a nested tree.Read-onlyGet Collection Tree
Get collections as a nested tree. Returns top-level collections, each with a children array, plus here/below markers for the item types they contain. Use this to understand folder structure; use metabase_collections_list for a flat list.
Inputs
exclude_archivedboolean- Set true to leave out archived collections.
exclude_other_user_collectionsboolean- Set true to hide other users' personal collections.
namespacestring- Collection namespace. Leave empty for regular collections; use snippets for SQL snippet folders.
metabase_collections_listList every collection the API key can read, as a flat list.Read-onlyList Collections
List every collection the API key can read, as a flat list. Returns each collection's id, name, description, location (its parent path), personal_owner_id, archived, and can_write. Use this to find a collection ID; use metabase_collection_tree_get for the nested hierarchy and metabase_collection_items_list for a collection's contents.
Inputs
archivedboolean- Set true to return archived (trashed) collections instead of active ones.
exclude_other_user_collectionsboolean- Set true to hide other users' personal collections (admins see them by default).
namespacestring- Collection namespace. Leave empty for regular collections; use snippets for SQL snippet folders.
personal_onlyboolean- Set true to return only personal collections.
metabase_dashboard_getGet a dashboard by ID, including its cards, tabs, and filters.Read-onlyGet Dashboard
Get a dashboard by ID, including its cards, tabs, and filters. Returns name, description, collection, parameters, tabs, and dashcards (each with its card, position, size, and parameter mappings). Use this to read a dashboard's layout or to find dashcard IDs for metabase_dashboard_card_query; use metabase_search to find dashboards.
Inputs
dashboard_idintegerrequired- ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.
metabase_dashboard_param_values_getGet the possible values of a dashboard filter.Read-onlyGet Dashboard Filter Values
Get the possible values of a dashboard filter. Returns values (a list of value or [value, label] pairs) and has_more_values. Use this to pick valid filter values before calling metabase_dashboard_card_query.
Inputs
dashboard_idintegerrequired- ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.
param_keystringrequired- ID of the dashboard filter (parameters[].id from metabase_dashboard_get).
metabase_dashboard_query_metadata_getGet the databases, tables, and fields used by all the cards on a dashboard.Read-onlyGet Dashboard Query Metadata
Get the databases, tables, and fields used by all the cards on a dashboard. Returns databases, tables (with fields), fields, and cards. Use this to see which columns a dashboard's filters can be wired to.
Inputs
dashboard_idintegerrequired- ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.
metabase_database_fields_listList every field (column) across all tables of a database.Read-onlyList Database Fields
List every field (column) across all tables of a database. Returns an array of fields with id, name, display_name, table_name, schema, and base_type. Use this to find a field ID by column name.
Inputs
database_idintegerrequired- ID of the database connected to Metabase. Find it with metabase_databases_list.
metabase_database_getGet one connected database by ID, optionally with its tables and fields.Read-onlyGet Database
Get one connected database by ID, optionally with its tables and fields. Returns id, name, engine, features, sync schedule, and (with include) tables and fields. Use metabase_database_metadata_get for full table and field metadata.
Inputs
database_idintegerrequired- ID of the database connected to Metabase. Find it with metabase_databases_list.
includestring- Set to tables to include its tables, or tables.fields to include tables and their fields.one of
tablestables.fields
metabase_database_metadata_getGet a database's full metadata: every visible table with its fields and types.Read-onlyGet Database Metadata
Get a database's full metadata: every visible table with its fields and types. Returns the database with tables[], each with fields[] (name, display_name, base_type, semantic_type, fk_target_field_id). Use this to understand a schema before writing SQL; it can be large, so use metabase_database_schema_tables_list for one schema.
Inputs
database_idintegerrequired- ID of the database connected to Metabase. Find it with metabase_databases_list.
include_hiddenboolean- Set true to include hidden tables and fields.
skip_fieldsboolean- Set true to return tables without their fields (smaller response).
metabase_database_schema_tables_listList the tables in one schema of a database.Read-onlyList Schema Tables
List the tables in one schema of a database. Returns an array of tables with id, name, display_name, schema, and description. Use this to find a table ID; use metabase_table_query_metadata_get to see the table's columns.
Inputs
database_idintegerrequired- ID of the database connected to Metabase. Find it with metabase_databases_list.
schemastringrequired- Schema name, from metabase_database_schemas_list (for example public).
metabase_database_schemas_listList the schema names in a database that contain tables.Read-onlyList Database Schemas
List the schema names in a database that contain tables. Returns an array of schema names. Use this before metabase_database_schema_tables_list.
Inputs
database_idintegerrequired- ID of the database connected to Metabase. Find it with metabase_databases_list.
metabase_databases_listList the data sources (databases) connected to Metabase.Read-onlyList Databases
List the data sources (databases) connected to Metabase. Returns data, an array of databases with id, name, engine, and features (and their tables if include=tables). Use this to find a database ID for queries; use metabase_database_get for one database.
Inputs
includestring- Set to tables to include each database's tables in the response.one of
tables savedboolean- Set true to also include the virtual 'Saved Questions' database.
metabase_field_getGet one field (column) by ID.Read-onlyGet Field
Get one field (column) by ID. Returns name, display_name, description, base_type, semantic_type, visibility_type, has_field_values, fk_target_field_id, and its table. Use metabase_field_values_get for the field's distinct values.
Inputs
field_idintegerrequired- ID of the field (column). Find it with metabase_table_query_metadata_get or metabase_database_fields_list.
metabase_field_summary_getGet the row count and distinct-value count of a field.Read-onlyGet Field Summary
Get the row count and distinct-value count of a field. Returns [["count", n], ["distincts", n]]. Use this for a quick cardinality check on a column.
Inputs
field_idintegerrequired- ID of the field (column). Find it with metabase_table_query_metadata_get or metabase_database_fields_list.
metabase_field_values_getGet the distinct values Metabase has cached for a field (used for filter dropdowns).Read-onlyGet Field Values
Get the distinct values Metabase has cached for a field (used for filter dropdowns). Returns values (a list of [value] or [value, label] pairs), has_more_values, and field_id. Use this to pick valid filter values; values exist only for fields with has_field_values=list.
Inputs
field_idintegerrequired- ID of the field (column). Find it with metabase_table_query_metadata_get or metabase_database_fields_list.
metabase_notification_getGet one notification (question alert or dashboard subscription) by ID.Read-onlyGet Notification
Get one notification (question alert or dashboard subscription) by ID. Returns id, payload_type, payload, subscriptions (schedule), handlers (channels and recipients), and active. Use this to find handler IDs for metabase_notification_send.
Inputs
notification_idintegerrequired- ID of the notification, from metabase_notifications_list.
metabase_notifications_listList notifications: question alerts and dashboard subscriptions (Metabase 53+).Read-onlyList Notifications
List notifications: question alerts and dashboard subscriptions (Metabase 53+). Returns an array of notifications with id, payload_type, payload (the card or dashboard), subscriptions (schedule), handlers (email or Slack recipients), creator_id, and active. Use metabase_notification_get for one notification and metabase_notification_send to send one now.
Inputs
card_idinteger- Only notifications (alerts) on this card ID.
creator_idinteger- Only notifications created by this user ID.
include_inactiveboolean- Set true to include inactive (archived) notifications.
payload_typestring- Kind of notification: notification/card (alert) or notification/dashboard (subscription).one of
notification/cardnotification/dashboard recipient_idinteger- Only notifications that this user ID receives.
metabase_popular_items_listList the most viewed dashboards, questions, and models on the instance.Read-onlyList Popular Items
List the most viewed dashboards, questions, and models on the instance. Returns up to 5 items, each with model, model_id, and model_object (name, description, collection). Use this to suggest commonly used content; use metabase_search to look something up.
Inputs
This tool takes no inputs.
metabase_revisions_listList the revision history of a card, dashboard, segment, or document.Read-onlyList Revisions
List the revision history of a card, dashboard, segment, or document. Returns an array of revisions with id, timestamp, user, description of the change, and is_reversion. Use this to find a revision_id for metabase_revision_revert.
Inputs
entitystringrequired- Type of object: card, dashboard, segment, or document.one of
carddashboardsegmentdocument idintegerrequired- ID of the object.
metabase_searchSearch Metabase content by name and description: questions, models, metrics, dashboards, collections, tables, databases, segments, and actions.Read-onlySearch
Search Metabase content by name and description: questions, models, metrics, dashboards, collections, tables, databases, segments, and actions. Returns data (each result's id, model, name, description, collection, and table or database info) and total. Use this to find something by name; use metabase_collection_items_list to browse a folder.
Inputs
archivedboolean- Set true to search only archived (trashed) items.
created_atstring- Only return items created in this date range, using Metabase date filter syntax such as past30days, thisyear, or 2026-01-01~2026-03-31.
created_byarray- Only return items created by these user IDs.
filter_items_in_personal_collectionstring- Personal collection filter: only, only-mine, exclude, exclude-others, or all.one of
allonlyonly-mineexcludeexclude-others last_edited_atstring- Only return items last edited in this date range, such as past7days or 2026-01-01~2026-03-31.
last_edited_byarray- Only return items last edited by these user IDs.
modelsarray- Only return these types: card (question), dataset (model), metric, dashboard, collection, table, database, segment, action, indexed-entity, or document. Leave empty for all.
qstring- Text to search for.
search_native_queryboolean- Set true to also match text inside SQL queries.
table_db_idinteger- Only return tables, questions, and models from this database ID.
verifiedboolean- Set true to return only verified items (paid plans).
metabase_segment_getGet one segment by ID.Read-onlyGet Segment
Get one segment by ID. Returns id, name, description, table_id, definition, archived, and creator. Use this to read a segment's filter definition before editing it.
Inputs
segment_idintegerrequired- ID of the segment, from metabase_segments_list.
metabase_segments_listList all segments (saved, named filters on a table).Read-onlyList Segments
List all segments (saved, named filters on a table). Returns an array of segments with id, name, description, table_id, definition, and archived. Use metabase_segment_get for one segment.
Inputs
This tool takes no inputs.
metabase_snippet_getGet one SQL snippet by ID.Read-onlyGet SQL Snippet
Get one SQL snippet by ID. Returns id, name, description, content, collection_id, and archived. Use this to read a snippet's SQL before editing it.
Inputs
snippet_idintegerrequired- ID of the snippet, from metabase_snippets_list.
metabase_snippets_listList SQL snippets (reusable pieces of SQL referenced as {{snippet: name}}).Read-onlyList SQL Snippets
List SQL snippets (reusable pieces of SQL referenced as {{snippet: name}}). Returns an array of snippets with id, name, description, content, and collection_id. Use metabase_snippet_get for one snippet.
Inputs
archivedboolean- Set true to list archived snippets instead of active ones.
metabase_table_foreign_keys_listList the foreign keys in other tables that point to this table.Read-onlyList Table Foreign Keys
List the foreign keys in other tables that point to this table. Returns an array of {origin, destination, relationship} objects with field and table details. Use this to discover how tables join.
Inputs
table_idintegerrequired- ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.
metabase_table_getGet one table's details by ID.Read-onlyGet Table
Get one table's details by ID. Returns id, name, display_name, schema, db_id, description, entity_type, and visibility_type. Use metabase_table_query_metadata_get to also get its columns.
Inputs
table_idintegerrequired- ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.
metabase_table_query_metadata_getGet a table's columns and related metadata for building queries.Read-onlyGet Table Query Metadata
Get a table's columns and related metadata for building queries. Returns the table with its database and fields[] (id, name, display_name, base_type, semantic_type, fk_target_field_id, and distinct values when cached). Use this to learn a table's columns before writing a query.
Inputs
table_idintegerrequired- ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.
include_hidden_fieldsboolean- Set true to include hidden fields.
include_sensitive_fieldsboolean- Set true to include fields marked sensitive.
metabase_tables_listList every table Metabase knows about, across all connected databases.Read-onlyList Tables
List every table Metabase knows about, across all connected databases. Returns an array of tables with id, db_id, schema, name, display_name, and visibility_type. Use this to find a table ID; use metabase_database_schema_tables_list to list one schema's tables.
Inputs
This tool takes no inputs.
metabase_timeline_event_getGet one timeline event by ID.Read-onlyGet Timeline Event
Get one timeline event by ID. Returns id, name, description, timestamp, timezone, time_matters, icon, timeline_id, and archived. Use metabase_timeline_get with include=events to list a timeline's events.
Inputs
event_idintegerrequired- ID of the timeline event, from metabase_timeline_get with include=events.
metabase_timeline_getGet one timeline, optionally with its events in a date range.Read-onlyGet Timeline
Get one timeline, optionally with its events in a date range. Returns id, name, description, icon, collection_id, and events (with include=events). Use this to find event IDs.
Inputs
timeline_idintegerrequired- ID of the timeline, from metabase_timelines_list.
archivedboolean- Set true to include archived events as well as active ones.
endstring- Only include events on or before this date (ISO 8601).
includestring- Set to events to include the timeline's events.one of
events startstring- Only include events on or after this date (ISO 8601).
metabase_timelines_listList timelines (groups of events, such as launches or incidents, shown on time-series charts).Read-onlyList Timelines
List timelines (groups of events, such as launches or incidents, shown on time-series charts). Returns an array of timelines with id, name, description, icon, collection_id, and (with include=events) their events. Use metabase_collection_timelines_list for one collection's timelines.
Inputs
archivedboolean- Set true to list archived timelines instead of active ones.
includestring- Set to events to include each timeline's events.one of
events
metabase_user_current_getGet the Metabase user the API key acts as.Read-onlyGet Current User
Get the Metabase user the API key acts as. Returns id, email, common_name, is_superuser, group memberships, and personal_collection_id. Use this to check the connection and what the key can do.
Inputs
This tool takes no inputs.
metabase_user_getGet one Metabase user by ID.Read-onlyGet User
Get one Metabase user by ID. Requires admin or group-manager permissions unless it is the key's own user. Returns id, email, first_name, last_name, is_active, is_superuser, user_group_memberships, and last_login. Use metabase_users_list to find a user ID.
Inputs
user_idintegerrequired- ID of the user, from metabase_users_list.
metabase_users_listList Metabase users, with search and paging.Read-onlyList Users
List Metabase users, with search and paging. Requires admin or group-manager permissions. Returns data (each user's id, email, first_name, last_name, is_active, is_superuser, last_login), total, limit, and offset. Use this to find a user ID (for example to filter search by creator); use metabase_user_get for one user.
Inputs
group_idinteger- Only users in this permission group ID.
limitinteger- Maximum number of users to return (page size).
offsetinteger- Number of users to skip, for paging.
querystring- Match first name, last name, or email.
statusstring- Which users: active (default), deactivated, or all.one of
activedeactivatedall
metabase_action_executeRun an action, which writes to the connected database (insert, update, delete, or custom SQL).WriteExecute Action
Run an action, which writes to the connected database (insert, update, delete, or custom SQL). Returns the action's result, such as rows-affected or created-row. Get the parameter IDs from metabase_action_get first. This changes data in the source database.
Inputs
action_idintegerrequired- ID of the action to run, from metabase_actions_list.
parametersobject- Parameter values keyed by parameter ID (from metabase_action_get). Example: {"id": 17, "status": "shipped"}.
metabase_card_copyDuplicate a card; the copy is named 'Copy of <name>' and saved in the same place.WriteCopy Card
Duplicate a card; the copy is named 'Copy of <name>' and saved in the same place. Returns the new card, including its id. Use metabase_card_update afterwards to rename or move the copy.
Inputs
card_idintegerrequired- ID of the card to copy.
metabase_card_createCreate a saved question, model, or metric (card) from a query.WriteCreate Card
Create a saved question, model, or metric (card) from a query. Returns the new card, including its id. Use this to save a query for reuse; use metabase_native_query_run to run SQL without saving it.
Inputs
dataset_queryobjectrequired- The query, as a Metabase query object. Metabase treats this as opaque, so the safest way is to copy the dataset_query of an existing card (metabase_card_get with legacy_mbql=true). A SQL query looks like {"database": 1, "type": "native", "native": {"query": "SELECT * FROM orders LIMIT 10"}}; a table query looks like {"database": 1, "type": "query", "query": {"source-table": 12}}.
displaystringrequired- How to visualize the results: table, bar, line, area, row, pie, scalar, smartscalar, combo, pivot, funnel, map, scatter, progress, gauge, waterfall, or object.
namestringrequired- Name of the card.
cache_ttlinteger- Cache duration multiplier for query results, in hours. Leave empty to use the instance default.
collection_idinteger- ID of the collection to put the card in. Leave empty for the root collection ('Our analytics'). Find IDs with metabase_collections_list.
collection_positioninteger- Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
dashboard_idinteger- Save the question directly inside this dashboard (a dashboard question) instead of a collection. Leave empty to save it to a collection.
descriptionstring- Description of the card.
parametersarray- Parameter (filter) definitions as an array of objects. Each needs an id, name, slug, and type such as category, date/single, or number/=. Example: [{"id": "a1b2c3d4", "name": "Category", "slug": "category", "type": "category"}].
typestring- Kind of card: question (default), model, or metric.one of
questionmodelmetric visualization_settingsobject- Visualization settings object for the chart (for example column formatting or graph dimensions). Leave empty to use defaults ({}).
metabase_card_queryRun a saved question, model, or metric and get its results, optionally with filter values.WriteRun Card Query
Run a saved question, model, or metric and get its results, optionally with filter values. Returns data.rows, data.cols (column names and types), row_count, and status. Use this to get a card's results; use metabase_native_query_run for SQL that is not saved as a card.
Inputs
card_idintegerrequired- ID of the card to run.
ignore_cacheboolean- Set true to re-run the query instead of returning cached results.
parametersarray- Filter values to apply, as an array of objects. Each has the parameter id, its type, a value, and a target (copy the target from the parameter definition returned by the get tool). Example: [{"id": "a1b2c3d4", "type": "category", "value": ["Gizmo"], "target": ["dimension", ["template-tag", "category"]]}].
metabase_card_updateUpdate a card's name, description, query, visualization, collection, or archived state.WriteUpdate Card
Update a card's name, description, query, visualization, collection, or archived state. Returns the updated card. Use archived=true to move a card to the trash (recoverable); use metabase_card_delete to delete it permanently.
- Idempotent
Inputs
card_idintegerrequired- ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.
archivedboolean- Set true to move the card to the trash, or false to restore it.
cache_ttlinteger- Cache duration multiplier for query results, in hours. Leave empty to use the instance default.
collection_idinteger- Move the card to this collection ID.
collection_positioninteger- Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
dashboard_idinteger- Move the question into this dashboard (makes it a dashboard question).
dataset_queryobject- The query, as a Metabase query object. Metabase treats this as opaque, so the safest way is to copy the dataset_query of an existing card (metabase_card_get with legacy_mbql=true). A SQL query looks like {"database": 1, "type": "native", "native": {"query": "SELECT * FROM orders LIMIT 10"}}; a table query looks like {"database": 1, "type": "query", "query": {"source-table": 12}}.
descriptionstring- New description.
displaystring- New visualization type: table, bar, line, area, row, pie, scalar, smartscalar, combo, pivot, funnel, map, scatter, progress, gauge, waterfall, or object.
namestring- New name.
parametersarray- Parameter (filter) definitions as an array of objects. Each needs an id, name, slug, and type such as category, date/single, or number/=. Example: [{"id": "a1b2c3d4", "name": "Category", "slug": "category", "type": "category"}].
typestring- Change the kind of card: question, model, or metric.one of
questionmodelmetric visualization_settingsobject- Visualization settings object for the chart (for example column formatting or graph dimensions). Leave empty to use defaults ({}).
metabase_collection_createCreate a collection (folder) for questions, dashboards, and models.WriteCreate Collection
Create a collection (folder) for questions, dashboards, and models. Returns the new collection, including its id. Use metabase_collection_update to rename, move, or archive it later.
Inputs
namestringrequired- Name of the collection.
authority_levelstring- Set to official to mark it as an official collection (paid plans only).one of
official descriptionstring- Description of the collection.
namespacestring- Collection namespace. Leave empty for a regular collection; use snippets to create a SQL snippet folder.
parent_idinteger- ID of the parent collection. Leave empty to create it at the root.
metabase_collection_updateRename, describe, move, or archive a collection.WriteUpdate Collection
Rename, describe, move, or archive a collection. Returns the updated collection. Use archived=true to move it and its contents to the trash; use metabase_collection_delete to remove a trashed collection permanently.
- Idempotent
Inputs
collection_idintegerrequired- ID of the collection to update.
archivedboolean- Set true to move the collection to the trash, or false to restore it.
authority_levelstring- Set to official to mark it as an official collection (paid plans only).one of
official descriptionstring- New description.
namestring- New name.
parent_idinteger- Move the collection under this parent collection ID.
metabase_dashboard_card_queryRun one card on a dashboard with the dashboard's filter values applied.WriteRun Dashboard Card Query
Run one card on a dashboard with the dashboard's filter values applied. Returns data.rows, data.cols, row_count, and status. Use this to get results as they appear on a dashboard; use metabase_card_query to run the card on its own. Get dashcard_id and card_id from metabase_dashboard_get.
Inputs
card_idintegerrequired- ID of the card inside that dashcard (dashcards[].card_id from metabase_dashboard_get).
dashboard_idintegerrequired- ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.
dashcard_idintegerrequired- ID of the dashcard (the card's placement on the dashboard), from the dashcards array of metabase_dashboard_get.
parametersarray- Dashboard filter values to apply, as an array of {id, type, value} objects. The id is the dashboard parameter id from metabase_dashboard_get. Example: [{"id": "a1b2c3d4", "type": "category", "value": ["Gizmo"]}].
metabase_dashboard_copyCopy a dashboard, optionally also duplicating its questions (deep copy).WriteCopy Dashboard
Copy a dashboard, optionally also duplicating its questions (deep copy). Returns the new dashboard, including its id. Use this to make a variant of a dashboard without changing the original.
Inputs
dashboard_idintegerrequired- ID of the dashboard to copy.
collection_idinteger- ID of the collection to put the copy in. Leave empty for the root collection ('Our analytics'). Find IDs with metabase_collections_list.
collection_positioninteger- Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
descriptionstring- Description for the copy.
is_deep_copyboolean- Set true to also duplicate every question on the dashboard; false (default) reuses the original questions.
namestring- Name for the copy. Defaults to the original name.
metabase_dashboard_createCreate an empty dashboard in a collection.WriteCreate Dashboard
Create an empty dashboard in a collection. Returns the new dashboard, including its id. Use metabase_dashboard_update with dashcards afterwards to add cards to it.
Inputs
namestringrequired- Name of the dashboard.
cache_ttlinteger- Cache duration multiplier for query results, in hours. Leave empty to use the instance default.
collection_idinteger- ID of the collection to put the dashboard in. Leave empty for the root collection ('Our analytics'). Find IDs with metabase_collections_list.
collection_positioninteger- Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
descriptionstring- Description of the dashboard.
parametersarray- Parameter (filter) definitions as an array of objects. Each needs an id, name, slug, and type such as category, date/single, or number/=. Example: [{"id": "a1b2c3d4", "name": "Category", "slug": "category", "type": "category"}].
metabase_dashboard_updateUpdate a dashboard's details, filters, cards, or tabs, or archive it.WriteUpdate Dashboard
Update a dashboard's details, filters, cards, or tabs, or archive it. Returns the updated dashboard. Use archived=true to move it to the trash (recoverable); use metabase_dashboard_delete to delete it permanently. To change cards, read the current dashcards with metabase_dashboard_get first, because the dashcards you send replace the existing set.
- Idempotent
Inputs
dashboard_idintegerrequired- ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.
archivedboolean- Set true to move the dashboard to the trash, or false to restore it.
auto_apply_filtersboolean- Set false to make viewers click Apply before filter changes run.
cache_ttlinteger- Cache duration multiplier for query results, in hours. Leave empty to use the instance default.
collection_idinteger- Move the dashboard to this collection ID.
collection_positioninteger- Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
dashcardsarray- The full list of cards on the dashboard. This replaces the existing set, so include every card you want to keep (with its id) and add new ones with a negative id. Each needs card_id, row, col, size_x, and size_y. Example: [{"id": -1, "card_id": 42, "row": 0, "col": 0, "size_x": 12, "size_y": 6}].
descriptionstring- New description.
namestring- New name.
parametersarray- Parameter (filter) definitions as an array of objects. Each needs an id, name, slug, and type such as category, date/single, or number/=. Example: [{"id": "a1b2c3d4", "name": "Category", "slug": "category", "type": "category"}].
tabsarray- The full list of dashboard tabs. Existing tabs keep their id; new tabs use a negative id. Example: [{"id": -1, "name": "Overview"}].
widthstring- Layout width: fixed or full.one of
fixedfull
metabase_database_rescan_valuesStart a rescan of the distinct values Metabase stores for filter dropdowns in a database.WriteRescan Database Field Values
Start a rescan of the distinct values Metabase stores for filter dropdowns in a database. Returns {status: ok}; the scan runs in the background. Use this when filter dropdowns show stale values. Requires admin permissions.
Inputs
database_idintegerrequired- ID of the database connected to Metabase. Find it with metabase_databases_list.
metabase_database_sync_schemaStart a schema sync so Metabase picks up new or changed tables and columns in a database.WriteSync Database Schema
Start a schema sync so Metabase picks up new or changed tables and columns in a database. Returns {status: ok}; the sync runs in the background. Use this after changing the source database's schema; use metabase_table_sync_schema for one table. Requires admin permissions.
Inputs
database_idintegerrequired- ID of the database connected to Metabase. Find it with metabase_databases_list.
metabase_field_updateUpdate a field's metadata in Metabase: display name, description, semantic type, visibility, or filter behavior.WriteUpdate Field
Update a field's metadata in Metabase: display name, description, semantic type, visibility, or filter behavior. Returns the updated field. This changes Metabase's data model only, not the source database. Requires data model permissions.
- Idempotent
Inputs
field_idintegerrequired- ID of the field (column). Find it with metabase_table_query_metadata_get or metabase_database_fields_list.
caveatsstring- Caveats readers should know about the field.
descriptionstring- Description of the field.
display_namestring- Friendly name shown in Metabase.
fk_target_field_idinteger- For a foreign key, the ID of the field it points to.
has_field_valuesstring- Filter widget for this field: list (dropdown), search (search box), none (plain input), or auto-list.one of
listsearchnoneauto-list points_of_intereststring- Notes on what is interesting about the field.
semantic_typestring- Semantic type, such as type/PK, type/FK, type/Category, type/Email, type/Currency, type/CreationTimestamp, or type/Name.
settingsobject- Column formatting settings object, for example {"currency": "EUR"}.
visibility_typestring- Where the field shows: normal, details-only, sensitive, hidden, or retired.one of
normaldetails-onlysensitivehiddenretired
metabase_native_query_runRun a SQL (native) query against a connected database without saving it.WriteRun SQL Query
Run a SQL (native) query against a connected database without saving it. Returns data.rows, data.cols (column names and types), row_count, and status. Results are capped by Metabase (2,000 rows by default). Use this for ad-hoc SQL; use metabase_card_query to run a saved question. The key's group needs native query permission on the database.
Inputs
database_idintegerrequired- ID of the database to query. Find it with metabase_databases_list.
sqlstringrequired- The SQL to run, in the database's dialect.
parametersarray- Values for the SQL variables, as an array of {type, target, value} objects. Example: [{"type": "category", "target": ["variable", ["template-tag", "category"]], "value": "Gizmo"}].
template_tagsobject- Definitions of {{variables}} used in the SQL, keyed by tag name. Example: {"category": {"name": "category", "display-name": "Category", "type": "text"}}. Leave empty when the SQL has no variables.
metabase_notification_sendSend a notification (question alert or dashboard subscription) right now, outside its schedule.WriteSend Notification
Send a notification (question alert or dashboard subscription) right now, outside its schedule. Returns an empty response on success. Use this to deliver a report on demand; optionally limit it to some of its handlers (channels).
Inputs
notification_idintegerrequired- ID of the notification to send, from metabase_notifications_list.
handler_idsarray- Only send through these handler IDs (from metabase_notification_get). Leave empty to send through all handlers.
metabase_query_runRun any Metabase query object (SQL or query-builder/MBQL) without saving it.WriteRun Query
Run any Metabase query object (SQL or query-builder/MBQL) without saving it. Returns data.rows, data.cols, row_count, and status. Use this to re-run or tweak an existing card's dataset_query; use metabase_native_query_run for plain SQL.
Inputs
dataset_queryobjectrequired- The full query object, as in a card's dataset_query (copy one from metabase_card_get with legacy_mbql=true and edit it). Example table query: {"database": 1, "type": "query", "query": {"source-table": 12, "limit": 10}}.
metabase_query_to_nativeConvert a query-builder (MBQL) query into the SQL Metabase would run, without running it.WriteConvert Query to SQL
Convert a query-builder (MBQL) query into the SQL Metabase would run, without running it. Returns {query: <SQL string>, params}. Use this to see or reuse the SQL behind a question; pass the result's query to metabase_native_query_run.
Inputs
dataset_queryobjectrequired- The query object to convert, as in a card's dataset_query (from metabase_card_get with legacy_mbql=true). Example: {"database": 1, "type": "query", "query": {"source-table": 12, "limit": 10}}.
prettyboolean- Set false to return the SQL without formatting (default true).
metabase_revision_revertRestore a card, dashboard, segment, or document to an earlier revision.WriteRevert to Revision
Restore a card, dashboard, segment, or document to an earlier revision. Returns the new revision created by the revert. Get the revision_id from metabase_revisions_list first.
Inputs
entitystringrequired- Type of object: card, dashboard, segment, or document.one of
carddashboardsegmentdocument idintegerrequired- ID of the object.
revision_idintegerrequired- ID of the revision to restore, from metabase_revisions_list.
metabase_segment_createCreate a segment: a saved, named filter on a table that others can reuse in questions.WriteCreate Segment
Create a segment: a saved, named filter on a table that others can reuse in questions. Returns the new segment, including its id. Requires data model permissions on the table.
Inputs
definitionobjectrequired- The filter that defines the segment, as a Metabase query object on one table. Metabase treats query objects as opaque; copy one from an existing segment (metabase_segment_get) and edit it. Example: {"database": 1, "type": "query", "query": {"source-table": 12, "filter": [">", ["field", 301, null], 100]}}.
namestringrequired- Name of the segment.
descriptionstring- Description of the segment.
metabase_segment_updateUpdate a segment's name, description, or filter definition, or archive it.WriteUpdate Segment
Update a segment's name, description, or filter definition, or archive it. Returns the updated segment. Use archived=true to retire a segment; a revision_message is always required.
- Idempotent
Inputs
revision_messagestringrequired- Short note describing the change, saved in the revision history.
segment_idintegerrequired- ID of the segment, from metabase_segments_list.
archivedboolean- Set true to archive the segment, or false to restore it.
caveatsstring- Caveats readers should know about the segment.
definitionobject- The filter that defines the segment, as a Metabase query object on one table. Metabase treats query objects as opaque; copy one from an existing segment (metabase_segment_get) and edit it. Example: {"database": 1, "type": "query", "query": {"source-table": 12, "filter": [">", ["field", 301, null], 100]}}.
descriptionstring- New description.
namestring- New name.
points_of_intereststring- Notes on what is interesting about the segment.
show_in_getting_startedboolean- Set true to feature the segment in the getting-started guide.
metabase_snippet_createCreate a reusable SQL snippet that SQL questions can include as {{snippet: name}}.WriteCreate SQL Snippet
Create a reusable SQL snippet that SQL questions can include as {{snippet: name}}. Returns the new snippet, including its id. Use metabase_snippet_update to change it later.
Inputs
contentstringrequired- The SQL text of the snippet.
namestringrequired- Snippet name, used as {{snippet: name}} in SQL. Cannot contain '}' or start with a space.
collection_idinteger- ID of the snippet folder (a collection in the snippets namespace). Leave empty for the top level.
descriptionstring- Description of the snippet.
metabase_snippet_updateUpdate a SQL snippet's name, SQL, description, or folder, or archive it.WriteUpdate SQL Snippet
Update a SQL snippet's name, SQL, description, or folder, or archive it. Returns the updated snippet. Renaming a snippet does not update SQL that references the old name.
- Idempotent
Inputs
snippet_idintegerrequired- ID of the snippet, from metabase_snippets_list.
archivedboolean- Set true to archive the snippet, or false to restore it.
collection_idinteger- Move the snippet to this snippet folder ID.
contentstring- New SQL text.
descriptionstring- New description.
namestring- New snippet name. Cannot contain '}' or start with a space.
metabase_table_rescan_valuesStart a rescan of the distinct values stored for filter dropdowns on one table's fields.WriteRescan Table Field Values
Start a rescan of the distinct values stored for filter dropdowns on one table's fields. Returns {status: ok}; the scan runs in the background. Use metabase_database_rescan_values for a whole database. Requires admin permissions.
Inputs
table_idintegerrequired- ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.
metabase_table_sync_schemaStart a schema sync for one table so Metabase picks up new or changed columns.WriteSync Table Schema
Start a schema sync for one table so Metabase picks up new or changed columns. Returns {status: ok}; the sync runs in the background. Use metabase_database_sync_schema to sync a whole database. Requires admin permissions.
Inputs
table_idintegerrequired- ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.
metabase_table_updateUpdate a table's metadata in Metabase: display name, description, visibility, or field order.WriteUpdate Table
Update a table's metadata in Metabase: display name, description, visibility, or field order. Returns the updated table. This changes Metabase's data model only, not the source database. Requires data model permissions.
- Idempotent
Inputs
table_idintegerrequired- ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.
caveatsstring- Caveats readers should know about the table.
descriptionstring- Description of the table.
display_namestring- Friendly name shown in Metabase.
field_orderstring- Column order: database, alphabetical, custom, or smart.one of
databasealphabeticalcustomsmart points_of_intereststring- Notes on what is interesting about the table.
show_in_getting_startedboolean- Set true to feature the table in the getting-started guide.
visibility_typestring- Hide the table: hidden, technical, or cruft. Leave empty to keep the current setting.one of
hiddentechnicalcruft
metabase_timeline_createCreate a timeline to hold events (such as launches or incidents) shown on time-series charts.WriteCreate Timeline
Create a timeline to hold events (such as launches or incidents) shown on time-series charts. Returns the new timeline, including its id. Add events with metabase_timeline_event_create.
Inputs
namestringrequired- Name of the timeline.
collection_idinteger- Collection the timeline belongs to. Leave empty for the root collection.
defaultboolean- Set true to make this the collection's default timeline.
descriptionstring- Description of the timeline.
iconstring- Icon: star, cake, mail, mail_at, warning, bell, cloud, info, note, or event.one of
starcakemailmail_atwarningbellcloudinfonoteevent
metabase_timeline_event_createAdd an event (such as a launch or incident) to a timeline so it appears on time-series charts.WriteCreate Timeline Event
Add an event (such as a launch or incident) to a timeline so it appears on time-series charts. Returns the new event, including its id. Create the timeline first with metabase_timeline_create if needed.
Inputs
namestringrequired- Name of the event.
timeline_idintegerrequired- ID of the timeline to add the event to.
timestampstringrequired- When the event happened, as an ISO 8601 date or datetime.
timezonestringrequired- IANA time zone of the timestamp.
descriptionstring- Description of the event (Markdown supported).
iconstring- Icon: star, cake, mail, mail_at, warning, bell, cloud, info, note, or event.one of
starcakemailmail_atwarningbellcloudinfonoteevent time_mattersboolean- Set true if the time of day matters; false (default) treats it as an all-day event.
metabase_timeline_event_updateUpdate a timeline event's name, time, description, or icon, move it to another timeline, or archive it.WriteUpdate Timeline Event
Update a timeline event's name, time, description, or icon, move it to another timeline, or archive it. Returns the updated event. Use metabase_timeline_event_delete to delete it permanently.
- Idempotent
Inputs
event_idintegerrequired- ID of the timeline event, from metabase_timeline_get with include=events.
archivedboolean- Set true to archive the event, or false to restore it.
descriptionstring- New description (Markdown supported).
iconstring- Icon: star, cake, mail, mail_at, warning, bell, cloud, info, note, or event.one of
starcakemailmail_atwarningbellcloudinfonoteevent namestring- New name.
time_mattersboolean- Set true if the time of day matters.
timeline_idinteger- Move the event to this timeline ID.
timestampstring- New date or datetime (ISO 8601).
timezonestring- IANA time zone of the timestamp.
metabase_timeline_updateUpdate a timeline's name, description, icon, or collection, or archive it.WriteUpdate Timeline
Update a timeline's name, description, icon, or collection, or archive it. Returns the updated timeline (without events). Archiving a timeline also archives its events; use metabase_timeline_delete to delete it permanently.
- Idempotent
Inputs
timeline_idintegerrequired- ID of the timeline, from metabase_timelines_list.
archivedboolean- Set true to archive the timeline and its events, or false to restore it.
collection_idinteger- Move the timeline to this collection ID.
defaultboolean- Set true to make this the collection's default timeline.
descriptionstring- New description.
iconstring- Icon: star, cake, mail, mail_at, warning, bell, cloud, info, note, or event.one of
starcakemailmail_atwarningbellcloudinfonoteevent namestring- New name.
metabase_card_deletePermanently delete a card (saved question, model, or metric).DestructiveDelete Card
Permanently delete a card (saved question, model, or metric). This cannot be undone. Returns an empty response on success. To move a card to the recoverable trash instead, use metabase_card_update with archived=true.
- Idempotent
Inputs
card_idintegerrequired- ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.
metabase_collection_deletePermanently delete a collection.DestructiveDelete Collection
Permanently delete a collection. This cannot be undone. Returns an empty response on success. Archive the collection first with metabase_collection_update (archived=true); to keep it recoverable, stop there.
- Idempotent
Inputs
collection_idintegerrequired- ID of the collection to delete.
metabase_dashboard_deletePermanently delete a dashboard.DestructiveDelete Dashboard
Permanently delete a dashboard. This cannot be undone. Returns an empty response on success. To move a dashboard to the recoverable trash instead, use metabase_dashboard_update with archived=true.
- Idempotent
Inputs
dashboard_idintegerrequired- ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.
metabase_timeline_deletePermanently delete a timeline and all of its events.DestructiveDelete Timeline
Permanently delete a timeline and all of its events. This cannot be undone. Returns an empty response on success. To keep it recoverable, use metabase_timeline_update with archived=true instead.
- Idempotent
Inputs
timeline_idintegerrequired- ID of the timeline, from metabase_timelines_list.
metabase_timeline_event_deletePermanently delete a timeline event.DestructiveDelete Timeline Event
Permanently delete a timeline event. This cannot be undone. Returns an empty response on success. To keep it recoverable, use metabase_timeline_event_update with archived=true instead.
- Idempotent
Inputs
event_idintegerrequired- ID of the timeline event, from metabase_timeline_get with include=events.
No tools match.