Skip to main content
The MCP server provides 36 tools organized by category. Your AI assistant picks the right tools automatically based on what you ask.
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

AuthUsed for
Service TokenOrg-level discovery, tenant lookup, data app and API token management, dashboard listing by workspace, semantic layer operations, natural language querying, datamart creation, and workspace-level metric creation
API TokenEmbed operations, guest token generation, data-app-scoped dashboard listing, widget operations, demo links, and scheduled report metadata
No Databrain API callCode generation or identity checks that do not call Databrain APIs
Production write tools default to dry-run where supported and require explicit confirmation before applying changes.

Session & Identity

ToolDescriptionAuth
whoamiReturn the credential mode currently used for API callsNo Databrain API call
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.
ToolDescriptionAuth
list_datasourcesList active datasources in your organizationService Token
discover_datasource_schemaInspect tables and columns in a datasourceService Token
list_datamartsList datamarts with table counts and semantic layer scoresService Token
list_workspacesList workspaces with datamart and datasource connectionsService Token
sync_datasourceTrigger a datasource schema sync to refresh table and column metadataService Token
create_datamartDry-run or apply creation of a datamart from selected tables and relationshipsService Token

create_datamart Safety

create_datamart defaults to mode: "dry_run" and returns a preview of the datamart configuration. Applying the write requires:
{
  "mode": "apply",
  "confirm": "APPLY_TO_PRODUCTION"
}
Key inputs include 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.
ToolDescriptionAuth
list_data_appsList data apps in your organization, optionally filtered by workspaceService Token
list_tenantsList available tenants/clients from the workspace tenancy databaseService Token
create_data_appCreate a new data appService Token
list_api_tokensList API tokens for a data app; omit dataAppName to auto-resolveService Token
create_api_tokenCreate and activate an API token for the current MCP sessionService Token
rotate_api_tokenRotate an API token and activate the replacement for the sessionService Token
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.
ToolDescriptionAuth
create_embedCreate a standard embed or a multi-tenant dashboard embed with clientIdAPI Token
list_embedsList embed configurations; use list_tenants for authoritative client discoveryAPI Token
get_embed_detailsGet full embed configuration including access settings and themeAPI Token
update_embedPatch embed access settings, permissions, options, filters, localization, theme, or nameAPI Token
customize_embed_themeApply theme presets, colors, fonts, cards, chart appearance, responsive layout, or access presetsAPI Token
get_demo_linkGenerate the hosted preview URL for a dashboard embed scoped to a clientIdAPI Token

Embed Creation Shape

For standard dashboard embeds, pass dashboardId, 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

Use customize_embed_theme for visual theming and access presets. Use update_embed for advanced embed changes such as filters, localization, permissions, or embed options. 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.
ToolDescriptionAuth
generate_guest_tokenGenerate a server-side guest token for frontend embeddingAPI Token
generate_embed_codeGenerate code for React, Next.js, Vue, Angular, Svelte, SolidJS, or vanilla HTMLNo Databrain API call
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.
ToolDescriptionAuth
ask_questionAsk a natural language question; returns data, SQL reasoning, and chart suggestionService Token
get_semantic_layerInspect semantic layer metadata, synonyms, and completion scoreService Token
update_semantic_layerAdd or update table/column descriptions, synonyms, example questions, and contextService Token
start_semantic_layer_generationStart semantic-layer auto-generation for a datamartService Token
get_semantic_layer_generation_statusPoll the semantic-layer generation job statusService Token
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.
ToolDescriptionAuth
list_dashboardsList dashboards globally, by workspace, or by data appService Token / API Token
list_widgetsList widgets on a customer dashboard; returns externalMetricId, metricId, name, publish state, and creatorAPI Token
validate_metric_specValidate a SQL-backed metric target without saving itAPI Token
create_or_update_metric_from_queryDry-run or apply a SQL-backed metric create/updateAPI Token
create_workspace_metricDry-run or apply creation of an unpublished workspace-level metric that is not attached to a dashboardService Token
add_widgetAdd a widget by cloning a template widget, supplying a metric configuration, or using a generated draftAPI Token
update_widgetPatch a widget by externalMetricId for one customer’s dashboardAPI Token
remove_widgetSoft-delete a widget for one clientId onlyAPI Token
generate_widgetGenerate a widget draft from a natural-language prompt; does not persist by itselfAPI Token

Customer-Scoped Widget Flow

For non-technical widget workflows, provide clientId 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:
{
  "mode": "apply",
  "confirm": "APPLY_TO_PRODUCTION"
}
Use 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 when you want an unpublished metric scoped to the workspace but not attached to a dashboard.

Scheduled Reports

ToolDescriptionAuth
list_scheduled_reportsList configured scheduled reports for a specific client/dashboard embedAPI Token
This tool returns schedule metadata such as subject, next scheduled time, recipient count, chart count, and download format.

Tool Count

CategoryCount
Session & Identity1
Infrastructure6
Data Apps & Tokens6
Embeds6
Runtime Integration2
Query & Semantic Layer5
Dashboards & Widgets9
Scheduled Reports1
Total36