Skip to main content
Glama
boejucci

Salesforce MCP Server (Extended)

by boejucci

salesforce_create_report

Create a new Salesforce report in tabular, summary, or matrix format with custom fields, filters, groupings, and charts via the Metadata API.

Instructions

Create a new Salesforce report using the Metadata API. Supports tabular, summary, and matrix formats with groupings, filters, and charts.

IMPORTANT - REPORT TYPE: The reportType parameter can be:

  1. A standard object name: "Opportunity", "Account", "Contact", "Lead", "Case", etc.

  2. A custom report type API name (use salesforce_list_report_types or salesforce_describe_report_type to find these)

IMPORTANT - FOLDER REQUIREMENT: Reports MUST be created in a folder. Common folders:

  • "unfiled$public" (default) - Public unfiled reports folder

  • "Private Reports" - Private user reports (not recommended for shared reports)

  • Custom folder names - Use salesforce_list_report_folders to find available folders

IMPORTANT - FIELD NAMING:

  • For standard objects (Opportunity, Account, etc.): Use UPPERCASE field names Examples: OPPORTUNITY_NAME, AMOUNT, STAGE_NAME, CREATED_DATE, CLOSE_DATE, ACCOUNT_NAME, INDUSTRY

  • For custom fields: Use exact API name with __c suffix (will be auto-prefixed with object name) Example: Type__c becomes "Opportunity.Type__c" automatically

  • Date range filters: Two filters on same date field with greaterOrEqual/lessOrEqual are automatically converted to timeFrameFilter

WORKFLOW TO CREATE A REPORT:

  1. First, use salesforce_describe_report_type to see available fields for your reportType

  2. Then use this tool with the correct field names from step 1

  3. If it fails, check the error message for field name issues

EXAMPLES:

  1. MSP opportunities by month (2024-2025): { "name": "MSP Opportunities 2024-2025", "reportType": "Opportunity", "format": "SUMMARY", "columns": ["OPPORTUNITY_NAME", "AMOUNT", "STAGE_NAME"], "filters": [ {"field": "Type__c", "operator": "equals", "value": "MSP"}, {"field": "CREATED_DATE", "operator": "greaterOrEqual", "value": "2024-01-01"}, {"field": "CREATED_DATE", "operator": "lessOrEqual", "value": "2025-12-31"} ], "groupingsDown": [{"field": "CREATED_DATE", "dateGranularity": "Month"}], "folder": "unfiled$public" }

  2. Accounts by industry: { "name": "Accounts by Industry", "reportType": "Account", "format": "SUMMARY", "columns": ["ACCOUNT_NAME", "INDUSTRY", "ANNUAL_REVENUE"], "filters": [{"field": "INDUSTRY", "operator": "notEqual", "value": ""}], "groupingsDown": [{"field": "INDUSTRY"}], "folder": "unfiled$public" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the report (will be sanitized for API name)
reportTypeYesReport type - either a standard object name (Opportunity, Account, Contact, Lead, Case, etc.) or a custom report type API name. Use salesforce_list_report_types to discover available report types.
formatYesReport format: TABULAR (simple list), SUMMARY (with groupings and subtotals), or MATRIX (rows and columns)
columnsYesList of field names in UPPERCASE (e.g., ["OPPORTUNITY_NAME", "AMOUNT", "STAGE_NAME"])
groupingsDownNoGroupings for rows (SUMMARY/MATRIX only)
groupingsAcrossNoGroupings for columns (MATRIX only)
filtersNoFilters to apply. Date ranges (two filters on same date field with greaterOrEqual/lessOrEqual) are automatically converted to timeFrameFilter.
chartNo
folderNoReport folder name. Default: "unfiled$public". Use salesforce_list_report_folders to see available folders. Common values: "unfiled$public", "Private Reports", or custom folder names.
descriptionNoReport description
Behavior4/5

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

With no annotations provided, the description carries full burden of behavioral disclosure. It reveals important behaviors such as automatic conversion of date range filters to timeFrameFilter and auto-prefixing custom fields with the object name. However, it does not mention permission requirements (beyond folder access) or what the API call returns, leaving minor gaps.

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 long but well-structured with clear headings, bullet points, and examples. It is front-loaded with key information like the IMPORTANT sections. While every section adds value, some repetition (e.g., field naming rules appear in multiple places) could be trimmed slightly, but overall it remains highly readable and efficient.

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?

Given the tool's complexity (10 parameters, nested objects) and no output schema, the description covers the input thoroughly with workflows, examples, and conventions. However, it does not describe what the tool returns (e.g., report ID or success confirmation), which would be helpful for an agent to confirm the result. This is a minor gap.

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

Parameters5/5

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

Schema coverage is high (90%), and the description adds substantial value beyond the schema by providing field naming rules (UPPERCASE for standard, __c for custom), examples of valid values for reportType (object names vs custom report types), and detailed usage patterns for filters (date ranges). This makes the parameters much clearer and easier to use correctly.

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 the tool creates a Salesforce report using the Metadata API, specifying supported formats (tabular, summary, matrix) and features like groupings, filters, and charts. This distinguishes it from sibling tools such as salesforce_read_report (which reads reports) or salesforce_list_reports (which lists reports). The verb 'Create' and resource 'Salesforce report' are specific and actionable.

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?

The description includes a dedicated 'WORKFLOW TO CREATE A REPORT' section with step-by-step instructions, prerequisites (using salesforce_describe_report_type to discover fields), and explicit guidance on folder requirements and field naming conventions. It clearly tells the agent when and how to use this tool, including what to do before invoking it, making it easy to select this tool over alternatives.

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/boejucci/mcp-server-salesforce'

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