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:
A standard object name: "Opportunity", "Account", "Contact", "Lead", "Case", etc.
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:
First, use salesforce_describe_report_type to see available fields for your reportType
Then use this tool with the correct field names from step 1
If it fails, check the error message for field name issues
EXAMPLES:
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" }
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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the report (will be sanitized for API name) | |
| reportType | Yes | Report 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. | |
| format | Yes | Report format: TABULAR (simple list), SUMMARY (with groupings and subtotals), or MATRIX (rows and columns) | |
| columns | Yes | List of field names in UPPERCASE (e.g., ["OPPORTUNITY_NAME", "AMOUNT", "STAGE_NAME"]) | |
| groupingsDown | No | Groupings for rows (SUMMARY/MATRIX only) | |
| groupingsAcross | No | Groupings for columns (MATRIX only) | |
| filters | No | Filters to apply. Date ranges (two filters on same date field with greaterOrEqual/lessOrEqual) are automatically converted to timeFrameFilter. | |
| chart | No | ||
| folder | No | Report folder name. Default: "unfiled$public". Use salesforce_list_report_folders to see available folders. Common values: "unfiled$public", "Private Reports", or custom folder names. | |
| description | No | Report description |