Datasource and workspace setup are completed in the Databrain UI. Datamarts can be planned with
create_datamart in dry_run mode and created only with confirm: "APPLY_TO_PRODUCTION".Auth Modes
Session & Identity
Use
whoami before mutating operations when you need to confirm whether the session is running with a service token or an API token.
Infrastructure - Exploration and Setup
6 tools for discovering infrastructure and managing production-safe datamart setup.create_datamart Safety
create_datamart defaults to mode: "dry_run" and returns a preview of the datamart configuration. Applying the write requires:
name, datasourceName, tableList, relationships, optional tenancySettings, or an advanced JSON configuration.
Data Apps & Tokens
6 tools for managing data apps, tenants, and API tokens. These are usually handled automatically during embed setup.API tokens are scoped to one data app. The MCP server can create or rotate them when
DATABRAIN_SERVICE_TOKEN is configured, so users should not paste API tokens into chat. Use list_tenants to find authoritative clientId values before creating guest tokens or editing tenant-scoped dashboards.Embeds
6 tools for creating, configuring, previewing, and theming embedded dashboards.Embed Creation Shape
For standard dashboard embeds, passdashboardId, workspaceName, and accessSettings: { datamartName }.
For per-client dashboard embeds, also pass clientId. The tool fills required isAllow* access settings with secure defaults, so only pass the flags the user explicitly wants enabled.
Theme and Advanced Config
Usecustomize_embed_theme for visual theming and access presets. Use update_embed for advanced embed changes such as filters, localization, permissions, or embed options.
Demo Links
get_demo_link returns the same kind of hosted preview URL as the Databrain UI’s “Share Demo Link” flow. It uses DATABRAIN_DEMO_DOMAIN when configured.
Runtime Integration
2 tools for generating guest tokens and frontend integration code.
Guest tokens should be generated in your server-side application and passed to the frontend component. Never expose API tokens in browser code.
Query & Semantic Layer
5 tools for natural language querying and data documentation.ask_question requires a datamart and a populated semantic layer. If results are poor, inspect the semantic layer first and improve descriptions before re-running the question.
Dashboards & Widgets
9 tools for dashboard discovery, workspace-level metrics, and customer-scoped widget management.Customer-Scoped Widget Flow
For non-technical widget workflows, provideclientId and dashboardName; include workspaceName only if dashboard names are ambiguous. If you do not know the clientId, call list_tenants with the workspace first. The tools resolve data app, datasource, embed ID, and integration details automatically.
Use externalMetricId for update_widget and remove_widget. Do not use the user-facing metricId slug for those operations.
SQL-to-Metric Safety
create_or_update_metric_from_query and create_workspace_metric default to mode: "dry_run". Applying requires:
validate_metric_spec first for dashboard-attached metric/widget changes, then dry-run, then apply only after the user reviews the plan. Use create_workspace_metric for internal (non-embed) workspace metrics — create by omitting metricId, or update by passing an existing metricId so the query and Dimensions/Measures are rewritten in place while publish/archived/draft state is preserved.
create_workspace_metric Upsert Behavior
create_workspace_metric upserts on metricId:
- Omit
metricIdto create. The slug is derived fromname, so re-running with the same name targets the same metric rather than creating a duplicate. - Pass an existing
metricIdto update that metric in place. The new SQL is saved and Dimensions/Measures are re-derived from the query output columns so the metric editor stays populated. - On update, archived/draft and publish state are preserved. The metric stays unattached to any dashboard unless you publish/attach it as a separate step.
Scheduled Reports
This tool returns schedule metadata such as subject, next scheduled time, recipient count, chart count, and download format.

