> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Metabase

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.

**Authentication:** API Key
**Categories:** Analytics
**Tools:** 77: 42 read, 30 write, 5 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=METABASE)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Metabase connection

   In **AgentKit > Connections**, create a Metabase connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   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.actions

   const connector = 'metabase'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { 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 call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'metabase_actions_list',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_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.actions

   connection_name = "metabase"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_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 call
   result = actions.execute_tool(
       tool_input={},
       tool_name="metabase_actions_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Metabase credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'metabase_action_get',
  toolInput: {
    action_id: 1,
  },
  connector: 'metabase',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="metabase_action_get",
    tool_input={
        "action_id": 1,
    },
    connection_name="metabase",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `metabase_action_get`

Get Action · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `action_id` (`integer`, required): ID of the action, from metabase_actions_list.

Example input: `{"action_id":1}`

### `metabase_actions_list`

List Actions · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `model_id` (`integer`, optional): Only actions defined on this model (card) ID.

Example input: `{}`

### `metabase_card_dashboards_list`

List Card Dashboards · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `card_id` (`integer`, required): ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.

Example input: `{"card_id":1}`

### `metabase_card_get`

Get Card · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `card_id` (`integer`, required): ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.
- `legacy_mbql` (`boolean`, optional): 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.

Example input: `{"card_id":1}`

### `metabase_card_query_metadata_get`

Get Card Query Metadata · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `card_id` (`integer`, required): ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.

Example input: `{"card_id":1}`

### `metabase_cards_list`

List Cards · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `f` (`string`, optional): 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: `all`, `mine`, `bookmarked`, `database`, `table`, `using_model`, `using_segment`, `archived`.
- `model_id` (`integer`, optional): 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.

Example input: `{}`

### `metabase_collection_get`

Get Collection · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `collection_id` (`string`, required): ID of the collection, or 'root' for the root collection ('Our analytics').

Example input: `{"collection_id":"<collection_id>"}`

### `metabase_collection_items_list`

List Collection Items · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `collection_id` (`string`, required): ID of the collection, or 'root' for top-level items.
- `archived` (`boolean`, optional): Set true to return archived (trashed) items instead of active ones.
- `limit` (`integer`, optional): Maximum number of items to return (page size).
- `models` (`array`, optional): 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.
- `offset` (`integer`, optional): Number of items to skip, for paging.
- `pinned_state` (`string`, optional): Pinned filter: all (default), is_pinned, or is_not_pinned. One of: `all`, `is_pinned`, `is_not_pinned`.
- `sort_column` (`string`, optional): Sort by name, last_edited_at, last_edited_by, model, or description. One of: `name`, `last_edited_at`, `last_edited_by`, `model`, `description`.
- `sort_direction` (`string`, optional): Sort direction: asc or desc. One of: `asc`, `desc`.

Example input: `{"collection_id":"<collection_id>"}`

### `metabase_collection_timelines_list`

List Collection Timelines · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `collection_id` (`string`, required): ID of the collection, or 'root' for the root collection.
- `archived` (`boolean`, optional): Set true to list archived timelines instead of active ones.
- `include` (`string`, optional): Set to events to include each timeline's events. One of: `events`.

Example input: `{"collection_id":"<collection_id>"}`

### `metabase_collection_tree_get`

Get Collection Tree · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `exclude_archived` (`boolean`, optional): Set true to leave out archived collections.
- `exclude_other_user_collections` (`boolean`, optional): Set true to hide other users' personal collections.
- `namespace` (`string`, optional): Collection namespace. Leave empty for regular collections; use snippets for SQL snippet folders.

Example input: `{}`

### `metabase_collections_list`

List Collections · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `archived` (`boolean`, optional): Set true to return archived (trashed) collections instead of active ones.
- `exclude_other_user_collections` (`boolean`, optional): Set true to hide other users' personal collections (admins see them by default).
- `namespace` (`string`, optional): Collection namespace. Leave empty for regular collections; use snippets for SQL snippet folders.
- `personal_only` (`boolean`, optional): Set true to return only personal collections.

Example input: `{}`

### `metabase_dashboard_get`

Get Dashboard · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `dashboard_id` (`integer`, required): ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.

Example input: `{"dashboard_id":1}`

### `metabase_dashboard_param_values_get`

Get Dashboard Filter Values · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `dashboard_id` (`integer`, required): ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.
- `param_key` (`string`, required): ID of the dashboard filter (parameters[].id from metabase_dashboard_get).

Example input: `{"dashboard_id":1,"param_key":"<param_key>"}`

### `metabase_dashboard_query_metadata_get`

Get Dashboard Query Metadata · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `dashboard_id` (`integer`, required): ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.

Example input: `{"dashboard_id":1}`

### `metabase_database_fields_list`

List Database Fields · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `database_id` (`integer`, required): ID of the database connected to Metabase. Find it with metabase_databases_list.

Example input: `{"database_id":1}`

### `metabase_database_get`

Get Database · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `database_id` (`integer`, required): ID of the database connected to Metabase. Find it with metabase_databases_list.
- `include` (`string`, optional): Set to tables to include its tables, or tables.fields to include tables and their fields. One of: `tables`, `tables.fields`.

Example input: `{"database_id":1}`

### `metabase_database_metadata_get`

Get Database Metadata · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `database_id` (`integer`, required): ID of the database connected to Metabase. Find it with metabase_databases_list.
- `include_hidden` (`boolean`, optional): Set true to include hidden tables and fields.
- `skip_fields` (`boolean`, optional): Set true to return tables without their fields (smaller response).

Example input: `{"database_id":1}`

### `metabase_database_schema_tables_list`

List Schema Tables · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `database_id` (`integer`, required): ID of the database connected to Metabase. Find it with metabase_databases_list.
- `schema` (`string`, required): Schema name, from metabase_database_schemas_list (for example public).

Example input: `{"database_id":1,"schema":"<schema>"}`

### `metabase_database_schemas_list`

List Database Schemas · Read-only

List the schema names in a database that contain tables.
Returns an array of schema names.
Use this before metabase_database_schema_tables_list.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `database_id` (`integer`, required): ID of the database connected to Metabase. Find it with metabase_databases_list.

Example input: `{"database_id":1}`

### `metabase_databases_list`

List Databases · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `include` (`string`, optional): Set to tables to include each database's tables in the response. One of: `tables`.
- `saved` (`boolean`, optional): Set true to also include the virtual 'Saved Questions' database.

Example input: `{}`

### `metabase_field_get`

Get Field · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `field_id` (`integer`, required): ID of the field (column). Find it with metabase_table_query_metadata_get or metabase_database_fields_list.

Example input: `{"field_id":1}`

### `metabase_field_summary_get`

Get Field Summary · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `field_id` (`integer`, required): ID of the field (column). Find it with metabase_table_query_metadata_get or metabase_database_fields_list.

Example input: `{"field_id":1}`

### `metabase_field_values_get`

Get Field Values · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `field_id` (`integer`, required): ID of the field (column). Find it with metabase_table_query_metadata_get or metabase_database_fields_list.

Example input: `{"field_id":1}`

### `metabase_notification_get`

Get Notification · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `notification_id` (`integer`, required): ID of the notification, from metabase_notifications_list.

Example input: `{"notification_id":1}`

### `metabase_notifications_list`

List Notifications · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `card_id` (`integer`, optional): Only notifications (alerts) on this card ID.
- `creator_id` (`integer`, optional): Only notifications created by this user ID.
- `include_inactive` (`boolean`, optional): Set true to include inactive (archived) notifications.
- `payload_type` (`string`, optional): Kind of notification: notification/card (alert) or notification/dashboard (subscription). One of: `notification/card`, `notification/dashboard`.
- `recipient_id` (`integer`, optional): Only notifications that this user ID receives.

Example input: `{}`

### `metabase_popular_items_list`

List Popular Items · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `metabase_revisions_list`

List Revisions · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `entity` (`string`, required): Type of object: card, dashboard, segment, or document. One of: `card`, `dashboard`, `segment`, `document`.
- `id` (`integer`, required): ID of the object.

Example input: `{"entity":"card","id":1}`

### `metabase_search`

Search · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `archived` (`boolean`, optional): Set true to search only archived (trashed) items.
- `created_at` (`string`, optional): 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_by` (`array`, optional): Only return items created by these user IDs.
- `filter_items_in_personal_collection` (`string`, optional): Personal collection filter: only, only-mine, exclude, exclude-others, or all. One of: `all`, `only`, `only-mine`, `exclude`, `exclude-others`.
- `last_edited_at` (`string`, optional): Only return items last edited in this date range, such as past7days or 2026-01-01~2026-03-31.
- `last_edited_by` (`array`, optional): Only return items last edited by these user IDs.
- `models` (`array`, optional): Only return these types: card (question), dataset (model), metric, dashboard, collection, table, database, segment, action, indexed-entity, or document. Leave empty for all.
- `q` (`string`, optional): Text to search for.
- `search_native_query` (`boolean`, optional): Set true to also match text inside SQL queries.
- `table_db_id` (`integer`, optional): Only return tables, questions, and models from this database ID.
- `verified` (`boolean`, optional): Set true to return only verified items (paid plans).

Example input: `{}`

### `metabase_segment_get`

Get Segment · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `segment_id` (`integer`, required): ID of the segment, from metabase_segments_list.

Example input: `{"segment_id":1}`

### `metabase_segments_list`

List Segments · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `metabase_snippet_get`

Get SQL Snippet · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `snippet_id` (`integer`, required): ID of the snippet, from metabase_snippets_list.

Example input: `{"snippet_id":1}`

### `metabase_snippets_list`

List SQL Snippets · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `archived` (`boolean`, optional): Set true to list archived snippets instead of active ones.

Example input: `{}`

### `metabase_table_foreign_keys_list`

List Table Foreign Keys · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `table_id` (`integer`, required): ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.

Example input: `{"table_id":1}`

### `metabase_table_get`

Get Table · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `table_id` (`integer`, required): ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.

Example input: `{"table_id":1}`

### `metabase_table_query_metadata_get`

Get Table Query Metadata · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `table_id` (`integer`, required): ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.
- `include_hidden_fields` (`boolean`, optional): Set true to include hidden fields.
- `include_sensitive_fields` (`boolean`, optional): Set true to include fields marked sensitive.

Example input: `{"table_id":1}`

### `metabase_tables_list`

List Tables · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `metabase_timeline_event_get`

Get Timeline Event · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `event_id` (`integer`, required): ID of the timeline event, from metabase_timeline_get with include=events.

Example input: `{"event_id":1}`

### `metabase_timeline_get`

Get Timeline · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `timeline_id` (`integer`, required): ID of the timeline, from metabase_timelines_list.
- `archived` (`boolean`, optional): Set true to include archived events as well as active ones.
- `end` (`string`, optional): Only include events on or before this date (ISO 8601).
- `include` (`string`, optional): Set to events to include the timeline's events. One of: `events`.
- `start` (`string`, optional): Only include events on or after this date (ISO 8601).

Example input: `{"timeline_id":1}`

### `metabase_timelines_list`

List Timelines · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `archived` (`boolean`, optional): Set true to list archived timelines instead of active ones.
- `include` (`string`, optional): Set to events to include each timeline's events. One of: `events`.

Example input: `{}`

### `metabase_user_current_get`

Get Current User · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `metabase_user_get`

Get User · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `user_id` (`integer`, required): ID of the user, from metabase_users_list.

Example input: `{"user_id":1}`

### `metabase_users_list`

List Users · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `group_id` (`integer`, optional): Only users in this permission group ID.
- `limit` (`integer`, optional): Maximum number of users to return (page size).
- `offset` (`integer`, optional): Number of users to skip, for paging.
- `query` (`string`, optional): Match first name, last name, or email.
- `status` (`string`, optional): Which users: active (default), deactivated, or all. One of: `active`, `deactivated`, `all`.

Example input: `{}`

### `metabase_action_execute`

Execute Action · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `action_id` (`integer`, required): ID of the action to run, from metabase_actions_list.
- `parameters` (`object`, optional): Parameter values keyed by parameter ID (from metabase_action_get). Example: {"id": 17, "status": "shipped"}.

Example input: `{"action_id":1}`

### `metabase_card_copy`

Copy Card · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `card_id` (`integer`, required): ID of the card to copy.

Example input: `{"card_id":1}`

### `metabase_card_create`

Create Card · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `dataset_query` (`object`, required): 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}}.
- `display` (`string`, required): How to visualize the results: table, bar, line, area, row, pie, scalar, smartscalar, combo, pivot, funnel, map, scatter, progress, gauge, waterfall, or object.
- `name` (`string`, required): Name of the card.
- `cache_ttl` (`integer`, optional): Cache duration multiplier for query results, in hours. Leave empty to use the instance default.
- `collection_id` (`integer`, optional): ID of the collection to put the card in. Leave empty for the root collection ('Our analytics'). Find IDs with metabase_collections_list.
- `collection_position` (`integer`, optional): Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
- `dashboard_id` (`integer`, optional): Save the question directly inside this dashboard (a dashboard question) instead of a collection. Leave empty to save it to a collection.
- `description` (`string`, optional): Description of the card.
- `parameters` (`array`, optional): 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"}].
- `type` (`string`, optional): Kind of card: question (default), model, or metric. One of: `question`, `model`, `metric`.
- `visualization_settings` (`object`, optional): Visualization settings object for the chart (for example column formatting or graph dimensions). Leave empty to use defaults ({}).

Example input: `{"dataset_query":{},"display":"<display>","name":"<name>"}`

### `metabase_card_query`

Run Card Query · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `card_id` (`integer`, required): ID of the card to run.
- `ignore_cache` (`boolean`, optional): Set true to re-run the query instead of returning cached results.
- `parameters` (`array`, optional): 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"]]}].

Example input: `{"card_id":1}`

### `metabase_card_update`

Update Card · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `card_id` (`integer`, required): ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.
- `archived` (`boolean`, optional): Set true to move the card to the trash, or false to restore it.
- `cache_ttl` (`integer`, optional): Cache duration multiplier for query results, in hours. Leave empty to use the instance default.
- `collection_id` (`integer`, optional): Move the card to this collection ID.
- `collection_position` (`integer`, optional): Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
- `dashboard_id` (`integer`, optional): Move the question into this dashboard (makes it a dashboard question).
- `dataset_query` (`object`, optional): 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}}.
- `description` (`string`, optional): New description.
- `display` (`string`, optional): New visualization type: table, bar, line, area, row, pie, scalar, smartscalar, combo, pivot, funnel, map, scatter, progress, gauge, waterfall, or object.
- `name` (`string`, optional): New name.
- `parameters` (`array`, optional): 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"}].
- `type` (`string`, optional): Change the kind of card: question, model, or metric. One of: `question`, `model`, `metric`.
- `visualization_settings` (`object`, optional): Visualization settings object for the chart (for example column formatting or graph dimensions). Leave empty to use defaults ({}).

Example input: `{"card_id":1}`

### `metabase_collection_create`

Create Collection · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Name of the collection.
- `authority_level` (`string`, optional): Set to official to mark it as an official collection (paid plans only). One of: `official`.
- `description` (`string`, optional): Description of the collection.
- `namespace` (`string`, optional): Collection namespace. Leave empty for a regular collection; use snippets to create a SQL snippet folder.
- `parent_id` (`integer`, optional): ID of the parent collection. Leave empty to create it at the root.

Example input: `{"name":"<name>"}`

### `metabase_collection_update`

Update Collection · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `collection_id` (`integer`, required): ID of the collection to update.
- `archived` (`boolean`, optional): Set true to move the collection to the trash, or false to restore it.
- `authority_level` (`string`, optional): Set to official to mark it as an official collection (paid plans only). One of: `official`.
- `description` (`string`, optional): New description.
- `name` (`string`, optional): New name.
- `parent_id` (`integer`, optional): Move the collection under this parent collection ID.

Example input: `{"collection_id":1}`

### `metabase_dashboard_card_query`

Run Dashboard Card Query · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `card_id` (`integer`, required): ID of the card inside that dashcard (dashcards[].card_id from metabase_dashboard_get).
- `dashboard_id` (`integer`, required): ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.
- `dashcard_id` (`integer`, required): ID of the dashcard (the card's placement on the dashboard), from the dashcards array of metabase_dashboard_get.
- `parameters` (`array`, optional): 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"]}].

Example input: `{"card_id":1,"dashboard_id":1,"dashcard_id":1}`

### `metabase_dashboard_copy`

Copy Dashboard · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `dashboard_id` (`integer`, required): ID of the dashboard to copy.
- `collection_id` (`integer`, optional): ID of the collection to put the copy in. Leave empty for the root collection ('Our analytics'). Find IDs with metabase_collections_list.
- `collection_position` (`integer`, optional): Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
- `description` (`string`, optional): Description for the copy.
- `is_deep_copy` (`boolean`, optional): Set true to also duplicate every question on the dashboard; false (default) reuses the original questions.
- `name` (`string`, optional): Name for the copy. Defaults to the original name.

Example input: `{"dashboard_id":1}`

### `metabase_dashboard_create`

Create Dashboard · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Name of the dashboard.
- `cache_ttl` (`integer`, optional): Cache duration multiplier for query results, in hours. Leave empty to use the instance default.
- `collection_id` (`integer`, optional): ID of the collection to put the dashboard in. Leave empty for the root collection ('Our analytics'). Find IDs with metabase_collections_list.
- `collection_position` (`integer`, optional): Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
- `description` (`string`, optional): Description of the dashboard.
- `parameters` (`array`, optional): 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"}].

Example input: `{"name":"<name>"}`

### `metabase_dashboard_update`

Update Dashboard · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `dashboard_id` (`integer`, required): ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.
- `archived` (`boolean`, optional): Set true to move the dashboard to the trash, or false to restore it.
- `auto_apply_filters` (`boolean`, optional): Set false to make viewers click Apply before filter changes run.
- `cache_ttl` (`integer`, optional): Cache duration multiplier for query results, in hours. Leave empty to use the instance default.
- `collection_id` (`integer`, optional): Move the dashboard to this collection ID.
- `collection_position` (`integer`, optional): Pin position in the collection (1 = first pinned slot). Leave empty to keep the item unpinned.
- `dashcards` (`array`, optional): 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}].
- `description` (`string`, optional): New description.
- `name` (`string`, optional): New name.
- `parameters` (`array`, optional): 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"}].
- `tabs` (`array`, optional): The full list of dashboard tabs. Existing tabs keep their id; new tabs use a negative id. Example: [{"id": -1, "name": "Overview"}].
- `width` (`string`, optional): Layout width: fixed or full. One of: `fixed`, `full`.

Example input: `{"dashboard_id":1}`

### `metabase_database_rescan_values`

Rescan Database Field Values · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `database_id` (`integer`, required): ID of the database connected to Metabase. Find it with metabase_databases_list.

Example input: `{"database_id":1}`

### `metabase_database_sync_schema`

Sync Database Schema · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `database_id` (`integer`, required): ID of the database connected to Metabase. Find it with metabase_databases_list.

Example input: `{"database_id":1}`

### `metabase_field_update`

Update Field · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `field_id` (`integer`, required): ID of the field (column). Find it with metabase_table_query_metadata_get or metabase_database_fields_list.
- `caveats` (`string`, optional): Caveats readers should know about the field.
- `description` (`string`, optional): Description of the field.
- `display_name` (`string`, optional): Friendly name shown in Metabase.
- `fk_target_field_id` (`integer`, optional): For a foreign key, the ID of the field it points to.
- `has_field_values` (`string`, optional): Filter widget for this field: list (dropdown), search (search box), none (plain input), or auto-list. One of: `list`, `search`, `none`, `auto-list`.
- `points_of_interest` (`string`, optional): Notes on what is interesting about the field.
- `semantic_type` (`string`, optional): Semantic type, such as type/PK, type/FK, type/Category, type/Email, type/Currency, type/CreationTimestamp, or type/Name.
- `settings` (`object`, optional): Column formatting settings object, for example {"currency": "EUR"}.
- `visibility_type` (`string`, optional): Where the field shows: normal, details-only, sensitive, hidden, or retired. One of: `normal`, `details-only`, `sensitive`, `hidden`, `retired`.

Example input: `{"field_id":1}`

### `metabase_native_query_run`

Run SQL Query · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `database_id` (`integer`, required): ID of the database to query. Find it with metabase_databases_list.
- `sql` (`string`, required): The SQL to run, in the database's dialect.
- `parameters` (`array`, optional): Values for the SQL variables, as an array of {type, target, value} objects. Example: [{"type": "category", "target": ["variable", ["template-tag", "category"]], "value": "Gizmo"}].
- `template_tags` (`object`, optional): 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.

Example input: `{"database_id":1,"sql":"<sql>"}`

### `metabase_notification_send`

Send Notification · Write

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).

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `notification_id` (`integer`, required): ID of the notification to send, from metabase_notifications_list.
- `handler_ids` (`array`, optional): Only send through these handler IDs (from metabase_notification_get). Leave empty to send through all handlers.

Example input: `{"notification_id":1}`

### `metabase_query_run`

Run Query · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `dataset_query` (`object`, required): 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}}.

Example input: `{"dataset_query":{}}`

### `metabase_query_to_native`

Convert Query to SQL · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `dataset_query` (`object`, required): 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}}.
- `pretty` (`boolean`, optional): Set false to return the SQL without formatting (default true).

Example input: `{"dataset_query":{}}`

### `metabase_revision_revert`

Revert to Revision · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `entity` (`string`, required): Type of object: card, dashboard, segment, or document. One of: `card`, `dashboard`, `segment`, `document`.
- `id` (`integer`, required): ID of the object.
- `revision_id` (`integer`, required): ID of the revision to restore, from metabase_revisions_list.

Example input: `{"entity":"card","id":1,"revision_id":1}`

### `metabase_segment_create`

Create Segment · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `definition` (`object`, required): 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]}}.
- `name` (`string`, required): Name of the segment.
- `description` (`string`, optional): Description of the segment.

Example input: `{"definition":{},"name":"<name>"}`

### `metabase_segment_update`

Update Segment · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `revision_message` (`string`, required): Short note describing the change, saved in the revision history.
- `segment_id` (`integer`, required): ID of the segment, from metabase_segments_list.
- `archived` (`boolean`, optional): Set true to archive the segment, or false to restore it.
- `caveats` (`string`, optional): Caveats readers should know about the segment.
- `definition` (`object`, optional): 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]}}.
- `description` (`string`, optional): New description.
- `name` (`string`, optional): New name.
- `points_of_interest` (`string`, optional): Notes on what is interesting about the segment.
- `show_in_getting_started` (`boolean`, optional): Set true to feature the segment in the getting-started guide.

Example input: `{"revision_message":"<revision_message>","segment_id":1}`

### `metabase_snippet_create`

Create SQL Snippet · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `content` (`string`, required): The SQL text of the snippet.
- `name` (`string`, required): Snippet name, used as {{snippet: name}} in SQL. Cannot contain '}' or start with a space.
- `collection_id` (`integer`, optional): ID of the snippet folder (a collection in the snippets namespace). Leave empty for the top level.
- `description` (`string`, optional): Description of the snippet.

Example input: `{"content":"<content>","name":"<name>"}`

### `metabase_snippet_update`

Update SQL Snippet · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `snippet_id` (`integer`, required): ID of the snippet, from metabase_snippets_list.
- `archived` (`boolean`, optional): Set true to archive the snippet, or false to restore it.
- `collection_id` (`integer`, optional): Move the snippet to this snippet folder ID.
- `content` (`string`, optional): New SQL text.
- `description` (`string`, optional): New description.
- `name` (`string`, optional): New snippet name. Cannot contain '}' or start with a space.

Example input: `{"snippet_id":1}`

### `metabase_table_rescan_values`

Rescan Table Field Values · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `table_id` (`integer`, required): ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.

Example input: `{"table_id":1}`

### `metabase_table_sync_schema`

Sync Table Schema · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `table_id` (`integer`, required): ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.

Example input: `{"table_id":1}`

### `metabase_table_update`

Update Table · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `table_id` (`integer`, required): ID of the table. Find it with metabase_tables_list or metabase_database_schema_tables_list.
- `caveats` (`string`, optional): Caveats readers should know about the table.
- `description` (`string`, optional): Description of the table.
- `display_name` (`string`, optional): Friendly name shown in Metabase.
- `field_order` (`string`, optional): Column order: database, alphabetical, custom, or smart. One of: `database`, `alphabetical`, `custom`, `smart`.
- `points_of_interest` (`string`, optional): Notes on what is interesting about the table.
- `show_in_getting_started` (`boolean`, optional): Set true to feature the table in the getting-started guide.
- `visibility_type` (`string`, optional): Hide the table: hidden, technical, or cruft. Leave empty to keep the current setting. One of: `hidden`, `technical`, `cruft`.

Example input: `{"table_id":1}`

### `metabase_timeline_create`

Create Timeline · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Name of the timeline.
- `collection_id` (`integer`, optional): Collection the timeline belongs to. Leave empty for the root collection.
- `default` (`boolean`, optional): Set true to make this the collection's default timeline.
- `description` (`string`, optional): Description of the timeline.
- `icon` (`string`, optional): Icon: star, cake, mail, mail_at, warning, bell, cloud, info, note, or event. One of: `star`, `cake`, `mail`, `mail_at`, `warning`, `bell`, `cloud`, `info`, `note`, `event`.

Example input: `{"name":"<name>"}`

### `metabase_timeline_event_create`

Create Timeline Event · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Name of the event.
- `timeline_id` (`integer`, required): ID of the timeline to add the event to.
- `timestamp` (`string`, required): When the event happened, as an ISO 8601 date or datetime.
- `timezone` (`string`, required): IANA time zone of the timestamp.
- `description` (`string`, optional): Description of the event (Markdown supported).
- `icon` (`string`, optional): Icon: star, cake, mail, mail_at, warning, bell, cloud, info, note, or event. One of: `star`, `cake`, `mail`, `mail_at`, `warning`, `bell`, `cloud`, `info`, `note`, `event`.
- `time_matters` (`boolean`, optional): Set true if the time of day matters; false (default) treats it as an all-day event.

Example input: `{"name":"<name>","timeline_id":1,"timestamp":"<timestamp>","timezone":"<timezone>"}`

### `metabase_timeline_event_update`

Update Timeline Event · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `event_id` (`integer`, required): ID of the timeline event, from metabase_timeline_get with include=events.
- `archived` (`boolean`, optional): Set true to archive the event, or false to restore it.
- `description` (`string`, optional): New description (Markdown supported).
- `icon` (`string`, optional): Icon: star, cake, mail, mail_at, warning, bell, cloud, info, note, or event. One of: `star`, `cake`, `mail`, `mail_at`, `warning`, `bell`, `cloud`, `info`, `note`, `event`.
- `name` (`string`, optional): New name.
- `time_matters` (`boolean`, optional): Set true if the time of day matters.
- `timeline_id` (`integer`, optional): Move the event to this timeline ID.
- `timestamp` (`string`, optional): New date or datetime (ISO 8601).
- `timezone` (`string`, optional): IANA time zone of the timestamp.

Example input: `{"event_id":1}`

### `metabase_timeline_update`

Update Timeline · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `timeline_id` (`integer`, required): ID of the timeline, from metabase_timelines_list.
- `archived` (`boolean`, optional): Set true to archive the timeline and its events, or false to restore it.
- `collection_id` (`integer`, optional): Move the timeline to this collection ID.
- `default` (`boolean`, optional): Set true to make this the collection's default timeline.
- `description` (`string`, optional): New description.
- `icon` (`string`, optional): Icon: star, cake, mail, mail_at, warning, bell, cloud, info, note, or event. One of: `star`, `cake`, `mail`, `mail_at`, `warning`, `bell`, `cloud`, `info`, `note`, `event`.
- `name` (`string`, optional): New name.

Example input: `{"timeline_id":1}`

### `metabase_card_delete`

Delete Card · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `card_id` (`integer`, required): ID of the card (a saved question, model, or metric). Find it with metabase_search or metabase_cards_list.

Example input: `{"card_id":1}`

### `metabase_collection_delete`

Delete Collection · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `collection_id` (`integer`, required): ID of the collection to delete.

Example input: `{"collection_id":1}`

### `metabase_dashboard_delete`

Delete Dashboard · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `dashboard_id` (`integer`, required): ID of the dashboard. Find it with metabase_search (models=dashboard) or metabase_collection_items_list.

Example input: `{"dashboard_id":1}`

### `metabase_timeline_delete`

Delete Timeline · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `timeline_id` (`integer`, required): ID of the timeline, from metabase_timelines_list.

Example input: `{"timeline_id":1}`

### `metabase_timeline_event_delete`

Delete Timeline Event · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `event_id` (`integer`, required): ID of the timeline event, from metabase_timeline_get with include=events.

Example input: `{"event_id":1}`

## Related

Other Analytics connectors ([all 109](/agentkit/connectors/?category=analytics)):

- [Microsoft 365](/agentkit/connectors/microsoft365/): Scalekit connector, OAuth, 317 tools
- [HubSpot](/agentkit/connectors/hubspot/): Scalekit connector, OAuth, 457 tools
- [Snowflake](/agentkit/connectors/snowflake/): Scalekit connector, OAuth, 42 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
