Skip to main content
Glama
aaron-pienza

Salesforce MCP Server

by aaron-pienza

salesforce_run_analytics

Execute Salesforce reports with optional filters and detail rows, or retrieve current dashboard component data without triggering a refresh.

Instructions

Execute a Salesforce report or retrieve current dashboard component data.

For reports: runs the report synchronously via the Analytics API. Supports optional runtime filter overrides, date filter overrides, and detail row inclusion. When includeDetails is true, defaults to returning 100 rows (override with topRows). The sync API has a hard maximum of 2,000 detail rows — a warning is included if results are truncated. Aggregates and grouping summaries are always returned in full.

For dashboards: retrieves each component's current data (aggregates, grouping summaries) without triggering a refresh. To refresh first, use salesforce_refresh_dashboard.

Examples:

  1. Run a report with saved defaults:

    • type: "report"

    • resourceId: "00Oxx000000XXXXX"

  2. Run a report with detail rows:

    • type: "report"

    • resourceId: "00Oxx000000XXXXX"

    • includeDetails: true

  3. Run a report with filter overrides:

    • type: "report"

    • resourceId: "00Oxx000000XXXXX"

    • includeDetails: true

    • filters: [{ "column": "STAGE_NAME", "operator": "equals", "value": "Closed Won" }]

    • standardDateFilter: { "column": "CLOSE_DATE", "durationValue": "LAST_N_DAYS:90" }

  4. Run a report with row limit:

    • type: "report"

    • resourceId: "00Oxx000000XXXXX"

    • includeDetails: true

    • topRows: { "rowLimit": 50, "direction": "Desc" }

  5. Run a report with multiple filters and boolean logic:

    • type: "report"

    • resourceId: "00Oxx000000XXXXX"

    • filters: [ { "column": "STAGE_NAME", "operator": "equals", "value": "Closed Won" }, { "column": "AMOUNT", "operator": "greaterThan", "value": "10000" } ]

    • booleanFilter: "1 AND 2"

  6. Get current dashboard component data:

    • type: "dashboard"

    • resourceId: "01Zxx000000XXXXX"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesType of analytics resource: "report" or "dashboard"
resourceIdYesThe 15 or 18-character Salesforce report or dashboard ID
includeDetailsNoReports only. Include detail rows in results (default false). Capped at 2,000 rows by the API.
filtersNoReports only. Runtime filter overrides applied for this execution only.
booleanFilterNoReports only. Boolean filter logic string (e.g., "1 AND (2 OR 3)").
standardDateFilterNoReports only. Standard date filter override.
topRowsNoReports only. Row limit with sort direction.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses that reports run synchronously, detail rows are capped at 2,000, aggregates always returned, and includes truncation warnings. For dashboards, it explicitly says no refresh is triggered. All key behaviors are stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is fairly long but well-structured with clear sections for reports and dashboards, plus bulleted examples. Each sentence contributes useful information. Could be slightly more concise, but appropriate for complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers both resource types, all parameters with examples, and behavioral notes. No output schema exists, and the description does not detail return values, which is a minor gap. Overall very complete for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining default behavior (includeDetails default false), cap on detail rows, and filter syntax. Examples demonstrate complex usage. However, the schema already provides good descriptions, so not a full 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it executes a Salesforce report or retrieves dashboard component data. It distinguishes between the two modes and references sibling tools like salesforce_refresh_dashboard for dashboard refresh.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use reports vs dashboards. States that for dashboard refresh, one should use salesforce_refresh_dashboard. Examples cover common use cases and parameter combinations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aaron-pienza/mcp-server-salesforce'

If you have feedback or need assistance with the MCP directory API, please join our Discord server