KosmoKrator

analytics

Metabase CLI for Headless Automation

Use the Metabase CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.

8 functions 8 read 0 write Username and password auth

Metabase CLI for Headless Automation

Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.

Use headless automation when another tool needs a stable local command surface. The Metabase CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Metabase CLI for Headless Automation
kosmokrator integrations:configure metabase --set hostname="$METABASE_HOSTNAME" --set username="$METABASE_USERNAME" --set password="$METABASE_PASSWORD" --enable --read allow --write ask --json
kosmo integrations:call metabase.metabase_list_dashboards '{}' --json

Discovery Before Execution

Agents and scripts can inspect Metabase docs and schemas before choosing a function.

kosmo integrations:docs metabase --json
kosmo integrations:docs metabase.metabase_list_dashboards --json
kosmo integrations:schema metabase.metabase_list_dashboards --json
kosmo integrations:search "Metabase" --json
kosmo integrations:list --json

Useful Metabase CLI Functions

FunctionTypeParametersDescription
metabase.metabase_list_dashboards Read none List all dashboards available in Metabase. Returns dashboard IDs, names, and basic metadata. Use metabase_get_dashboard to retrieve the full dashboard with cards.
metabase.metabase_get_dashboard Read id Get a single Metabase dashboard by ID, including all cards (questions), layout, and parameters. Use metabase_list_dashboards to find dashboard IDs.
metabase.metabase_list_cards Read none List all cards (questions/saved questions) in Metabase. Returns card IDs, names, collection info, and display types. Use metabase_get_card for full definitions or metabase_query_card to run a card.
metabase.metabase_get_card Read id Get the full definition of a Metabase card (question) by ID, including the query, display settings, and parameters. Use metabase_list_cards to find card IDs.
metabase.metabase_query_card Read id Execute a saved Metabase card (question) and return the query results as rows. Use metabase_list_cards or metabase_get_card to find card IDs. The card must be a question (not a model or metric).
metabase.metabase_list_databases Read none List all databases connected to Metabase. Returns database IDs, names, engine types, and metadata. Use metabase_get_database to retrieve tables and fields for a specific database.
metabase.metabase_get_database Read id Get detailed metadata for a Metabase database by ID, including its tables, fields, and schema information. Use metabase_list_databases to find database IDs.
metabase.metabase_get_current_user Read none Get the currently authenticated Metabase user profile, including name, email, and group memberships. Useful for verifying which account the integration is using.

Automation Notes

Related Metabase CLI Pages