Skip to main content
Glama
advancedcommunities

Salesforce MCP Server

search_records

Read-only

Search for text across multiple Salesforce objects at once using SOSL. Find records mentioning company names, keywords, or phrases without running separate SOQL queries.

Instructions

Search for text across multiple Salesforce objects simultaneously. USE THIS TOOL when searching for records that mention, contain, or reference specific text (like company names, keywords, phrases) across different objects. This is the PRIMARY tool for text-based searches across your org - it's much more efficient than running multiple SOQL queries. Perfect for finding all records mentioning a competitor, customer name, or any text across Accounts, Opportunities, Cases, Contacts, etc. SOSL (Salesforce Object Search Language) performs full-text search across all searchable fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=true), so the description's added behavioral value is limited to explaining that this is a full-text SOSL search across all searchable fields. It omits useful behavior such as the csv resultFormat writing to disk and any result-size or pagination limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the core message is clear, but the text is padded with restatement ('USE THIS TOOL when searching for records that mention, contain, or reference specific text') and marketing language ('Perfect for finding all records mentioning a competitor'). Several sentences could be cut without losing information.

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?

For a read-only search tool with annotations covering safety and no output schema, the description gives enough to select and call it confidently, including the object scope and the SOSL basis. It stops short of covering result format trade-offs or query-construction guidance for the one nested input object.

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

Parameters3/5

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

The description supplies no information about the inputs (query string, file path, targetOrg, resultFormat), leaving the nested 'input' wrapper entirely unexplained and offering no SOSL syntax example, which is valuable given SOSL is unusual syntax. The inner properties do carry their own schema descriptions, which keeps this at an adequate rather than failing level.

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?

States a specific verb and resource ('Search for text across multiple Salesforce objects simultaneously') and names the underlying mechanism (SOSL full-text search across all searchable fields). It is clearly distinguishable from the SOQL-based siblings such as query_records and query_records_to_file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use triggers ('records that mention, contain, or reference specific text') and declares itself the PRIMARY tool for cross-object text search, noting it is more efficient than running multiple SOQL queries. It never names the specific sibling to prefer for structured filtering, so routing is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.