Metabase
Overview
Section titled “Overview”Metabase is an open-source business intelligence tool that lets you ask questions about your data and visualize answers as charts, graphs, and dashboards. With the Metabase integration in SquadOS, your agents can run native SQL or MBQL queries, create and manage dashboards, organize report collections, and automate data analysis workflows directly from conversations.
- Composio documentation: docs.composio.dev/toolkits/metabase
Authentication
Section titled “Authentication”This tool uses API key (API_KEY) to connect.
You will need the following fields:
| Field | Required | Description |
|---|---|---|
api_key | Yes | API key generated in the admin panel of your Metabase instance. |
base_url | Yes | Base URL of your Metabase instance (e.g., https://metabase.yourcompany.com). |
How to get credentials
Section titled “How to get credentials”- Log in to your Metabase instance as an administrator.
- Go to Settings → Admin Settings.
- Navigate to the API Keys section (available in Metabase 48+).
- Click Create API key and give it a descriptive name (e.g., “SquadOS Integration”).
- Copy the generated key — it is only displayed once.
- Also note the base URL of your instance (e.g.,
https://metabase.yourcompany.com).
How to connect in SquadOS
Section titled “How to connect in SquadOS”- Go to Tools in the side menu (
/admin/tools). - Open the Available tab and search for
Metabase. - Click the card to open the details modal and hit Connect.
- You’re taken to the secure connection page hosted by Composio, where you enter the API key and instance URL obtained above.
- Once done, you’re sent back to SquadOS with the account connected and the tool available to your agents. (Connection-flow details in Organization Tools.)
Available actions
Section titled “Available actions”Run Card Query
Section titled “Run Card Query”METABASE_CREATE_CARD_QUERY1
Tool to run the query associated with a Card and return its results. Use when you need to execute a card’s query with optional parameters and cache control.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
card_id | integer | Yes | ID of the card to query. |
parameters | array | No | Query parameters to apply. Format: [{"type":"category","value":"value","target":["variable",["template-tag","tag-name"]]}] |
ignore_cache | boolean | No | Whether to bypass query cache and force fresh query execution. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Copy Dashboard
Section titled “Copy Dashboard”METABASE_CREATE_DASHBOARD_COPY
Tool to create a copy of an existing Metabase dashboard. Use when you need to duplicate a dashboard with optional customization of name, description, and collection placement. Supports both shallow copy (references same cards) and deep copy (duplicates all cards).
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
from_dashboard_id | integer | Yes | The ID of the dashboard to copy. |
name | string | No | Optional name for the copied dashboard. Must be a non-blank string if provided. |
description | string | No | Optional description for the copied dashboard. |
is_deep_copy | boolean | No | Set to true to create a deep copy that duplicates all questions/cards in the dashboard. Required when the dashboard contains Dashboard Questions. Default is false. |
collection_id | integer | No | Optional collection ID where the copied dashboard should be placed. Must be greater than zero if provided. |
collection_position | integer | No | Optional position within the collection. Must be greater than zero if provided. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Delete Card
Section titled “Delete Card”METABASE_DELETE_CARD
Tool to hard delete a Metabase card. Use when you need to permanently remove a card from the system. For soft deletion, use the update card action instead.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The ID of the card to delete. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Delete Dashboard
Section titled “Delete Dashboard”METABASE_DELETE_DASHBOARD
Tool to hard delete a Metabase dashboard by its ID. Use when you need to permanently remove a dashboard. For soft delete, use the update dashboard action instead (set archived to true).
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The ID of the dashboard to permanently delete. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Recent Activity Views
Section titled “Get Recent Activity Views”METABASE_GET_API_ACTIVITY_RECENT_VIEWS
Tool to retrieve recently viewed items in Metabase. Use when you need to get a list of cards, dashboards, collections, tables, or documents that the authenticated user has recently accessed. Returns metadata including timestamps and permissions for each viewed item.
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get All Alerts
Section titled “Get All Alerts”METABASE_GET_API_ALERT
Tool to retrieve all alerts in Metabase. Use when you need to get a list of all configured alerts with their settings and notification channels.
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Card by ID
Section titled “Get Card by ID”METABASE_GET_API_CARD_ID
Tool to retrieve a specific card (question) by its ID. Use when you need to get detailed information about a card including its query, visualization settings, and metadata.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The Card identifier. |
legacy_mbql | boolean | No | When set to true, returns the card dataset_query in MBQL 4 (legacy) format instead of MBQL 5. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get all collections
Section titled “Get all collections”METABASE_GET_API_COLLECTION
Tool to retrieve all collections that the current user has read permissions for. Returns collections with can_write property indicating write permissions.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
archived | boolean | No | If true, returns archived collections. If false or omitted, returns non-archived collections. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Collection Items
Section titled “Get Collection Items”METABASE_GET_API_COLLECTION_ID_ITEMS
Tool to retrieve items from a specific Metabase collection. Use when you need to list cards (questions), dashboards, nested collections, or pulses within a collection. Supports filtering by item type and archived status.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Collection ID to retrieve items from. |
model | string | No | Filter results by object type: card, dashboard, collection, or pulse. |
limit | integer | No | Maximum number of items to return per page. |
offset | integer | No | Number of items to skip before returning results. |
archived | string | No | "true" for archived items, "false" for active items. Defaults to "false". |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get All Databases
Section titled “Get All Databases”METABASE_GET_API_DATABASE
DEPRECATED: Use METABASE_LIST_DATABASES instead for a concise, LLM-friendly response. Retrieves all Database instances configured in Metabase with full detail including connection info.
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Database Metadata
Section titled “Get Database Metadata”METABASE_GET_API_DATABASE_ID_METADATA
Tool to retrieve complete metadata for a specific database including all tables and fields. Use when you need detailed information about database structure, table schemas, and field properties.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Database ID to retrieve metadata from. |
include_hidden | boolean | No | Include hidden tables and fields in the response. By default, only non-hidden tables and fields are returned. |
include_editable_data_model | boolean | No | Only return tables for which the current user has data model editing permissions. Requires Enterprise Edition. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Search Metabase objects
Section titled “Search Metabase objects”METABASE_GET_API_SEARCH
Tool to search Cards, Dashboards, Collections, Tables, Databases, and Pulses for a substring. Use when you need to find Metabase objects by name or search across multiple object types.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
q | string | No | Search query substring to search for within Cards, Dashboards, Collections, Tables, Databases, and Pulses. |
models | array | No | Array of model types to search within. Valid values: dashboard, metric, segment, card, collection, table, pulse, database. If omitted, searches all model types. |
archived | boolean | No | Filter by archived status. |
table_db_id | integer | No | Filter to specific database ID. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Current User
Section titled “Get Current User”METABASE_GET_API_USER_CURRENT
Tool to retrieve information about the currently authenticated user. Use when you need to get the current user’s profile, permissions, and account details.
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Dashboard by ID
Section titled “Get Dashboard by ID”METABASE_GET_DASHBOARD_BY_ID
Tool to retrieve a dashboard by its ID from Metabase. Use when you need to fetch dashboard details including name, description, cards, parameters, and metadata.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The dashboard ID to retrieve. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Table Schema
Section titled “Get Table Schema”METABASE_GET_TABLE_SCHEMA
Gets column names, types, and foreign key relationships for a Metabase table. Use this before writing queries to know exact column names and types. Accepts either a table_id directly, or database_id + table_name to look up the table. Discovery chain: METABASE_LIST_DATABASES → METABASE_LIST_TABLES → METABASE_GET_TABLE_SCHEMA → METABASE_POST_API_DATASET.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
table_id | integer | No | The Metabase table ID. Use METABASE_LIST_TABLES to find table IDs. Either table_id or (database_id + table_name) must be provided. |
table_name | string | No | Table name to look up (requires database_id). Case-insensitive matching. Optionally prefix with schema: public.users or just users. |
database_id | integer | No | The database ID (required when using table_name instead of table_id). Use METABASE_LIST_DATABASES to find database IDs. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Table By ID
Section titled “Get Table By ID”METABASE_GET_TABLE_BY_ID
Tool to retrieve basic table information by ID from Metabase. Use when you need table details including name, schema, entity type, and associated database information. For comprehensive table metadata with fields and query information, use METABASE_GET_TABLE_QUERY_METADATA instead.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The ID of the table to retrieve. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Table Query Metadata
Section titled “Get Table Query Metadata”METABASE_GET_TABLE_QUERY_METADATA
Tool to get metadata about a Table useful for running queries. Returns DB, fields, field FKs, and field values. Deprecated: Use METABASE_GET_TABLE_SCHEMA instead — it provides a more concise, LLM-friendly output with FK resolution and supports lookup by table name.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The table ID to retrieve query metadata for. |
include_hidden_fields | boolean | No | Include any hidden Fields in the response. Defaults to false. |
include_sensitive_fields | boolean | No | Include any sensitive Fields in the response. Defaults to false. |
include_editable_data_model | boolean | No | When true, checks that the current user has write permissions for the table’s data model. Defaults to false. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Databases
Section titled “List Databases”METABASE_LIST_DATABASES
Lists all databases configured in Metabase with essential info: ID, name, and engine. Use this first to discover available database IDs before running queries or listing tables.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
include_tables | boolean | No | Whether to include the list of table names for each database. Set to true when you need to discover which tables exist. Adds one extra API call per database, so leave false if you only need database IDs and names. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Tables
Section titled “List Tables”METABASE_LIST_TABLES
Lists all tables in a Metabase database with their IDs, names, and schemas. Use this after METABASE_LIST_DATABASES to discover available tables before querying. For detailed column information, use METABASE_GET_TABLE_SCHEMA next.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
database_id | integer | Yes | The database ID to list tables from. Use METABASE_LIST_DATABASES first to discover available database IDs. |
schema_name | string | No | Filter tables to a specific schema (e.g., public, dbo). If not provided, tables from all schemas are returned. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create Card
Section titled “Create Card”METABASE_POST_API_CARD
Tool to create a new Metabase card (question or model). Use when you need to create a new query, report, or visualization in Metabase.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the card. |
display | string | Yes | Display type for visualization (e.g., table, bar, line, pie, scalar, area). |
dataset_query | object | Yes | Query definition in MBQL or native SQL format. Must include database (integer ID), type (string: query or native), and the corresponding query object. |
description | string | No | Description of the card. |
collection_id | integer | No | ID of collection to place card in. |
visualization_settings | object | No | Settings for visualization display. Can be an empty object {}. |
collection_position | integer | No | Position within collection. |
result_metadata | array | No | Metadata about query results. |
metadata_checksum | string | No | Checksum of metadata. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Copy Card
Section titled “Copy Card”METABASE_POST_API_CARD_ID_COPY
Tool to create a copy of an existing Metabase card (question) by its ID. Use when you need to duplicate a card with all its query, visualization, and configuration settings.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The ID of the card to copy. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create Collection
Section titled “Create Collection”METABASE_POST_API_COLLECTION
Tool to create a new Metabase collection for organizing content. Use when you need to create a collection with name and color. Collections are used to organize dashboards, questions, and models in Metabase.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Collection name (non-blank string). |
color | string | Yes | Hex color code for the collection (must match pattern #[0-9A-Fa-f]{6}). |
parent_id | integer | No | Parent collection ID for nested collections (must be greater than 0). |
description | string | No | Collection description (non-blank string if provided). |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create Dashboard
Section titled “Create Dashboard”METABASE_POST_API_DASHBOARD
Tool to create a new Metabase dashboard. Use when you need to create a new dashboard for organizing and displaying visualizations and reports.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Dashboard name. Must be a non-blank string. |
description | string | No | Dashboard description. |
parameters | array | No | Dashboard filter parameters. Array of parameter objects that define filters users can apply to the dashboard. |
collection_id | integer | No | ID of collection to place dashboard in. If not specified, dashboard is created in root collection. |
collection_position | integer | No | Position within the collection. Determines the display order. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Execute Dataset Query
Section titled “Execute Dataset Query”METABASE_POST_API_DATASET
Tool to execute a query against a Metabase database and retrieve results. Use when you need to run native SQL or MBQL queries. Supports both raw SQL queries (type='native') and structured MBQL queries (type='query').
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Query type: native for raw SQL queries, query for MBQL (Metabase Query Language) queries. |
database | integer | Yes | The database ID to execute the query against. |
query | object | No | MBQL (Metabase Query Language) query structure. |
native | object | No | Native SQL query structure. |
parameters | array | No | Optional query parameters for parameterized queries. |
constraints | object | No | Query execution constraints. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create Notification
Section titled “Create Notification”METABASE_POST_API_NOTIFICATION
Tool to create a new notification in Metabase. Use when you need to create notifications for cards or other resources.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
payload_type | string | Yes | Type of notification to create. Common values include notification/card for card-based notifications. |
payload | object | Yes | Payload object containing notification details. For notification/card type, this should include card_id (integer) specifying which card the notification is for. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Update Card by ID
Section titled “Update Card by ID”METABASE_PUT_API_CARD_ID
Tool to update a specific card (question) by its ID. Use when you need to modify card properties like name, description, visualization settings, or query definition.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The ID of the card to update. |
name | string | No | Non-blank string for the card name. |
display | string | No | Display type for the card (e.g., table, bar, line, pie, scalar, area). |
archived | boolean | No | Whether the card is archived. |
description | string | No | String description of the card. |
collection_id | integer | No | ID of the collection containing this card. |
dataset_query | object | No | The query definition for the card. |
visualization_settings | object | No | Map of visualization settings. |
enable_embedding | boolean | No | Whether embedding is enabled. |
collection_position | integer | No | Position in collection, must be greater than 0. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Update Dashboard
Section titled “Update Dashboard”METABASE_UPDATE_DASHBOARD
Tool to update a Metabase dashboard by ID. Use when you need to modify dashboard properties like name, description, parameters, cards, or tabs. The request body accepts the same structure as the response from GET /api/dashboard/:id. When setting archived to true, the dashboard is moved to Trash; when false, you may provide a collection_id.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The ID of the dashboard to update. |
name | string | No | Dashboard name — must be non-blank string if provided. |
description | string | No | Dashboard description — may be empty or a string. |
archived | boolean | No | Whether the dashboard is archived. Set to true to move dashboard to Trash collection, false to restore it. |
collection_id | integer | No | Collection ID the dashboard belongs to. Use when moving dashboard to a different collection or when unarchiving. |
parameters | array | No | Array of parameter objects for the dashboard. Include this when updating dashboard filters. |
dashcards | array | No | List of dashboard cards with their configurations. Include the complete array when updating card positions or properties. |
tabs | array | No | List of dashboard tabs. Include when updating tab configuration. |
enable_embedding | boolean | No | Whether embedding is enabled for the dashboard. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |