salesforce_search_all
Search across multiple Salesforce objects using SOSL with per-object field selection, WHERE filters, and ORDER BY sorting.
Instructions
Search across multiple Salesforce objects using SOSL (Salesforce Object Search Language).
Examples:
Basic search across all objects: { "searchTerm": "John", "objects": [ { "name": "Account", "fields": ["Name"], "limit": 10 }, { "name": "Contact", "fields": ["FirstName", "LastName", "Email"] } ] }
Advanced search with filters: { "searchTerm": "Cloud*", "searchIn": "NAME FIELDS", "objects": [ { "name": "Account", "fields": ["Name", "Industry"], "orderBy": "Name DESC", "where": "Industry = 'Technology'" } ], "withClauses": [ { "type": "NETWORK", "value": "ALL NETWORKS" }, { "type": "SNIPPET", "fields": ["Description"] } ] }
Notes:
Use * and ? for wildcards in search terms
Each object can have its own WHERE, ORDER BY, and LIMIT clauses
Support for WITH clauses: DATA CATEGORY, DIVISION, METADATA, NETWORK, PRICEBOOKID, SNIPPET, SECURITY_ENFORCED
The updateable/viewable filters are reserved for future support and currently return a clear error if requested
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| searchTerm | Yes | Text to search for (supports wildcards * and ?) | |
| searchIn | No | Which fields to search in | |
| objects | Yes | List of objects to search and their return fields | |
| withClauses | No | Additional WITH clauses for the search | |
| updateable | No | Reserved for future support. If set, the tool returns an error instead of generating invalid SOSL. | |
| viewable | No | Reserved for future support. If set, the tool returns an error instead of generating invalid SOSL. |