You are here:
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: |
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: |
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: |
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: |
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: |
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: |
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: |
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: |
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: |
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: |
Full lens metadata including the query definition, visualization configuration, and dataset reference. | You need the query and visualization details of a specific lens. |
