Loading
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Important Advisory: iOS Update Impacting CG Mobile ApplicationRead More
CRM Analytics
CRM Analytics MCP Server Tool Reference

CRM Analytics MCP Server Tool Reference

Read-only tools that let MCP-compliant AI clients discover apps, inspect schemas, run SAQL queries, and read dashboard and lens metadata.

Required Editions

Available in Lightning Experience.
Available with CRM Analytics, which is available for an extra cost in Enterprise, Performance, and Unlimited Editions.

After you connect, you don't call these tools yourself. Ask your MCP-compliant AI client, such as ChatGPT, Claude, or Cursor, a question in natural language. The client selects the tools for the task.

For example, when you ask, "What were our top 10 accounts by revenue last fiscal year?", the AI client inspects the dataset schema, generates Salesforce Analytics Query Language (SAQL), and returns structured results with execute_query.

A typical query workflow is list_datasets to get_dataset (capture currentVersionId) to get_xmd (exact field names) to execute_query.

The Description / Inputs column notes required parameters. Other parameters are optional.

Organization and Discovery Tools

External MCP-compliant AI clients use these tools to find folders (apps) that contain dashboards, datasets, and lenses, and to load full folder metadata.

Tool Name Description / Inputs Returns Use When
list_folders

Returns folders (apps) the connected user can access.

Inputs: q (search terms; the tool appends a wildcard to the last token), scope (CreatedByMe, Mru, SharedWithMe), sort (Name, Mru, LastModified, LastModifiedBy), isPinned, pageSize (1–200, default 25), page.

Folder objects with ID, label, description, template source, and permissions. You need folder IDs to scope later list calls, or you want an inventory of apps.
get_folder

Returns full metadata for one folder (app).

Inputs: folderId (required). Discover IDs with list_folders.

A folder object with label, description, template source, and permissions. You need complete metadata for a specific app.

Data and Schema Tools

External MCP-compliant AI clients use these tools to list datasets and retrieve the field names, data types, and labels required to generate valid SAQL.

Tool Name Description / Inputs Returns Use When
list_datasets

Returns datasets in an app or across the org.

Inputs: q, folderId, datasetTypes (Default, Live, StagedData, Trended), scope, sort (Name, Mru, LastModified, TotalRows, CreatedDate, LastRefreshed, CreatedBy, LastQueried, ConnectionName), order (Ascending, Descending), includeCurrentVersion, pageSize (1–200, default 25), page.

Dataset objects with names, types, and last-modified dates. You need dataset names and IDs before you inspect a schema or run a query.
get_dataset

Returns full metadata for a dataset, including current version information.

Inputs: datasetIdOrApiName (required).

Dataset metadata including field names, data types, dimension and measure labels, and current version ID. You need currentVersionId before you call get_xmd or execute_query.
get_xmd

Returns extended metadata (XMD) for a dataset version, including exact field API names, data types, labels, and formatting.

Inputs: datasetIdOrApiName (required), versionId (required; 18-character ID that starts with 0Fc from get_dataset), xmdType (main default, query-ready; system; user).

Extended metadata for the dataset version, including field API names, data types, labels, and display formatting. You need precise field API names so the client can build syntactically correct SAQL.

Query and Analysis Tools

External MCP-compliant AI clients use this tool to run SAQL against a CRM Analytics dataset and return structured results. The client generates SAQL from your natural-language request.

Tool Name Description / Inputs Returns Use When
execute_query

Executes a SAQL query against a CRM Analytics dataset.

Inputs: query (required; SAQL pipeline; load stage must use "<datasetId>/<currentVersionId>"; end with q = limit q N;), queryLanguage (locked to Saql), timezone (time zone in IANA format, for example America/Los_Angeles), version (SAQL version; omit for latest).

Structured JSON query results with rows, column metadata, and query execution details. You want grouped, filtered, or ranked answers from a dataset. Don't use this tool for metadata discovery.

Dashboard, Visualization, and Exploration Tools

External MCP-compliant AI clients use these tools to find dashboards and saved explorations (lenses) and to retrieve widget, step, filter, and query definitions.

Tool Name Description / Inputs Returns Use When
list_dashboards

Returns CRM Analytics dashboards in an app or across the org.

Inputs: q, folderId, type (defaults to Dashboard; also DashboardSnapshot, Component—Component requires edit access and can return no results for view-only users), templateApiName, mobileOnly, ids, scope, sort, pageSize (1–200, default 25), page.

Dashboard objects with names, IDs, types, and app context. You need dashboard identifiers or want to browse prebuilt dashboards for an app.
get_dashboard

Returns full metadata for one dashboard, including widgets, steps, and filters.

Inputs: dashboardIdOrApiName (required).

Full dashboard metadata including widgets, steps, filter configurations, and layout details. You need the full definition of a specific dashboard.
list_lenses

Returns saved explorations (lenses) the connected user can access.

Inputs: q, folderId, scope, sort, pageSize (1–200, default 25), page.

Lens objects with names, IDs, and the datasets they reference. You need an inventory of saved explorations and the datasets that they use.
get_lens

Returns full metadata for one lens, including the query definition and dataset reference.

Inputs: lensIdOrApiName (required).

Full lens metadata including the query definition, visualization configuration, and dataset reference. You need the query and visualization details of a specific lens.
 
Loading
Salesforce Help | Article