All tools

Search records with SOSL

Runs a SOSL text search across several objects at once and returns the matches grouped by object.

View on GitHub
Updated Sep 27, 2026Available asMCPCLIAPI

Description

Use it when a name or email could be on a Lead, a Contact or an Account, for example `FIND {Acme} IN NAME FIELDS RETURNING Account(Id, Name), Contact(Id, Name, Email)`. Pass the URL-encoded search in `q`.

search-records.md

Search records with SOSL

Runs a SOSL text search across several objects at once and returns the matches grouped by object.

Use it when a name or email could be on a Lead, a Contact or an Account, for example FIND {Acme} IN NAME FIELDS RETURNING Account(Id, Name), Contact(Id, Name, Email). Pass the URL-encoded search in q.

Set up

Use the first option your agent supports.

MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

{ "mcpServers": { "salesforce": { "url": "https://api.salesforce.com/platform/mcp/v1/platform/sobject-mutations" } } }

Call the MCP tool find.

Server URL: https://api.salesforce.com/platform/mcp/v1/platform/sobject-mutations

CLI (official)

Install the command, then confirm it runs.

npm install @salesforce/cli --global
sf --version

Run sf data search.

API (official)

Before doing anything else, make one read-only call to confirm access.

Rules

  • Ask the user before anything that sends messages, costs money, or changes data.
  • Never print API keys.

Built from these files in the repository

The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.

Ways in

RouteSourceCallRequiredDocs
MCPOfficial · remotefindOAuthDocs
CLIOfficialsf data searchOAuthDocs
APIOfficialGET /services/data/vXX.X/search/OAuthDocs

Workflows using Search records with SOSL

No workflows yet
No published workflow uses Search records with SOSL yet.