Skip to main content
The MCP server supports guided prompts that walk you through common tasks end-to-end. You can trigger these by asking naturally or by referencing the prompt name directly.

Jump to a workflow

Embed a Dashboard

Most common starting point

Multi-Tenant Embeds

Per-client dashboards with RLS

Query Data

Natural language to SQL

Brand & Theme

Colors, fonts, responsive layout

Self-Serve Metrics

End-user metric creation

Filters

Dropdowns, date ranges, SQL

Embed an Existing Dashboard

The most common workflow. You have a dashboard built in the Databrain UI and want to embed it in your application. Ask your AI assistant:
“Embed my sales dashboard in my React app”
What happens behind the scenes:
1

Discover data apps

The assistant calls list_data_apps to find your available data apps.
2

Ensure API token

Checks for an existing API token via list_api_tokens. Creates one with create_api_token if needed.
3

Select workspace

Lists workspaces with list_workspaces. Auto-selects if you only have one, otherwise asks you to choose.
4

Choose dashboard

Lists dashboards with list_dashboards scoped to the selected workspace.
5

Create embed

Creates the embed configuration via create_embed with the selected dashboard and resolved datamart.
6

Generate frontend code

Generates a guest token with generate_guest_token and framework-specific integration code with generate_embed_code.
Prompt name: embed-existing-dashboard What you get: A working embed ID, a guest token, and copy-pasteable frontend code for your framework (React, Next.js, Vue, Angular, Svelte, or vanilla JS). You can paste it into your app and see the dashboard immediately.

Multi-Tenant / Per-Client Embeds

Each of your customers gets their own dashboard with row-level security via a clientId. Ask your AI assistant:
“Create per-client dashboard embeds for my SaaS app”
What happens:
  1. Lists data apps and datamarts to understand your setup
  2. For each client, calls create_embed with a unique clientId
  3. Each embed is scoped to that client’s data through row-level security
  4. Generates guest tokens per client for frontend use
Prompt name: embed-blank-dashboard
Multi-tenant embeds use clientId in create_embed to scope data. The underlying tenancy model (table-level, schema-level, or database-level) is configured in the Databrain UI.

Query Data with Natural Language

Ask questions about your data and get answers with chart suggestions — no dashboard or embed setup required. Ask your AI assistant:
“What was total revenue last month?”
“Show me the monthly revenue trend for the past year”
“Compare sales by region — break it down by quarter”
What happens:
1

Discover datamarts

The assistant calls list_datamarts to see available data.
2

Check semantic layer

Calls get_semantic_layer to verify that table and column descriptions exist.
3

Populate if needed

If the semantic layer is empty, auto-generates descriptions from column names using update_semantic_layer.
4

Ask the question

Sends your question to ask_question, which converts it to SQL, executes the query, and returns results with a chart type suggestion.
Follow-up questions use conversation context for better accuracy:
“Now show only the top 5 regions”
Prompt name: query-data What you get: A data result set (rows and columns) plus a suggested chart type for visualization. For follow-up questions, results build on the previous conversation context.

Brand and Theme an Embed

Customize colors, fonts, chart styles, responsive breakpoints, and card styling to match your product. Ask your AI assistant:
“Make my embed match our brand — primary color #4F46E5, dark mode, Inter font”
“Apply the corporate theme preset and hide the dashboard name”
What happens:
  1. Identifies the target embed via list_embeds or get_embed_details
  2. Applies theme changes through customize_embed_theme — supports presets, custom colors, font family, card styling, chart appearance (tooltips, legends, axes), and responsive breakpoints
  3. Applies UI options through configure_embed for toggles like hiding the dashboard name
Prompt name: brand-my-embed What you get: Your embed updated with the new theme. Remember to regenerate your guest token afterward — tokens encode the theme at creation time.

Enable Self-Serve Metric Creation

Let your end-users build their own metrics using drag-and-drop or AI-powered chat mode. Ask your AI assistant:
“Enable metric creation on my embed with the visual builder”
What happens:
  1. Lists embeds to find the target
  2. Updates embed access settings via update_embed to enable metric creation permissions
  3. Configures the creation mode (drag-and-drop or chat) through configure_embed
  4. Validates the setup with diagnose_embed_health
Prompt name: enable-metric-creation

Set Up Filters

Add dashboard-level filters to your embeds — dropdowns, date ranges, and server-side SQL filters. Ask your AI assistant:
“Add a date range filter and a region dropdown to my dashboard”
What happens:
  1. Retrieves current embed configuration with get_embed_details
  2. Configures filters through configure_embed — supports string filters, number filters, date filters, and SQL-based server-side filters
  3. Optionally hides specific dashboard filters using the hideDashboardFilters option
Prompt name: setup-filters

Localize an Embed

Set up multi-language support, translations, and calendar format. Ask your AI assistant:
“Set up French translations for my embed”
What happens:
  1. Retrieves current embed configuration
  2. Sets the language and calendar type through configure_embed
  3. Applies custom translation strings for UI labels
Prompt name: localize-embed

Secure an Embed

Configure permissions, access controls, and role-based guest tokens. Ask your AI assistant:
“Lock down the embed so users can only view, not edit”
What happens:
  1. Reviews current embed access settings via get_embed_details
  2. Updates permissions through update_embed — controls what end-users can do (view, download, create metrics, etc.)
  3. Generates a guest token with generate_guest_token including the appropriate permissions object
Prompt name: secure-my-embed

Manage Existing Embeds

List, compare, and review your embed configurations. Ask your AI assistant:
“Show me all my embeds and their current settings”
What happens:
  1. Lists all embeds via list_embeds
  2. Retrieves details for specific embeds with get_embed_details
  3. Optionally runs diagnose_embed_health to check for configuration issues
Prompt name: manage-embeds

Populate the Semantic Layer

Bootstrap table and column descriptions to enable natural language querying. Ask your AI assistant:
“Check the semantic layer quality for my orders datamart and add descriptions”
What happens:
1

Inspect current state

Calls get_semantic_layer to see the current completion score and which tables/columns lack descriptions.
2

Auto-generate descriptions

Generates human-readable descriptions from table and column names for any missing entries.
3

Push updates

Writes the new descriptions, synonyms, and example questions via update_semantic_layer.
4

Verify quality

Re-checks the semantic layer score to confirm improvement.
Prompt name: populate-semantic-layer
A well-populated semantic layer significantly improves ask_question accuracy. Add synonyms for business terms (e.g., “revenue” → “total_sales”) and example questions to guide the AI.