Salesforce MCP Server

MIT License
18
  • Apple
  • Linux

salesforce_search_all

Search across multiple Salesforce objects using SOSL with customizable filters, fields, and clauses. Retrieve specific records by applying WHERE, ORDER BY, and LIMIT options for targeted and efficient data access.

Instructions

Search across multiple Salesforce objects using SOSL (Salesforce Object Search Language).

Examples:

  1. Basic search across all objects: { "searchTerm": "John", "objects": [ { "name": "Account", "fields": ["Name"], "limit": 10 }, { "name": "Contact", "fields": ["FirstName", "LastName", "Email"] } ] }
  2. 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
  • "updateable" and "viewable" options control record access filtering

Input Schema

NameRequiredDescriptionDefault
objectsYesList of objects to search and their return fields
searchInNoWhich fields to search in
searchTermYesText to search for (supports wildcards * and ?)
updateableNoReturn only updateable records
viewableNoReturn only viewable records
withClausesNoAdditional WITH clauses for the search

Input Schema (JSON Schema)

{ "properties": { "objects": { "description": "List of objects to search and their return fields", "items": { "properties": { "fields": { "description": "Fields to return for this object", "items": { "type": "string" }, "type": "array" }, "limit": { "description": "Maximum number of records to return for this object", "optional": true, "type": "number" }, "name": { "description": "API name of the object", "type": "string" }, "orderBy": { "description": "ORDER BY clause for this object", "optional": true, "type": "string" }, "where": { "description": "WHERE clause for this object", "optional": true, "type": "string" } }, "required": [ "name", "fields" ], "type": "object" }, "type": "array" }, "searchIn": { "description": "Which fields to search in", "enum": [ "ALL FIELDS", "NAME FIELDS", "EMAIL FIELDS", "PHONE FIELDS", "SIDEBAR FIELDS" ], "optional": true, "type": "string" }, "searchTerm": { "description": "Text to search for (supports wildcards * and ?)", "type": "string" }, "updateable": { "description": "Return only updateable records", "optional": true, "type": "boolean" }, "viewable": { "description": "Return only viewable records", "optional": true, "type": "boolean" }, "withClauses": { "description": "Additional WITH clauses for the search", "items": { "properties": { "fields": { "description": "Fields for SNIPPET clause", "items": { "type": "string" }, "optional": true, "type": "array" }, "type": { "enum": [ "DATA CATEGORY", "DIVISION", "METADATA", "NETWORK", "PRICEBOOKID", "SNIPPET", "SECURITY_ENFORCED" ], "type": "string" }, "value": { "description": "Value for the WITH clause", "optional": true, "type": "string" } }, "required": [ "type" ], "type": "object" }, "optional": true, "type": "array" } }, "required": [ "searchTerm", "objects" ], "type": "object" }

You must be authenticated.

Other Tools from Salesforce MCP Server

Related Tools

ID: h0ldgpjlzf