Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Search Records (SOSL)

sf_search_records
Read-onlyIdempotent

Search across multiple Salesforce objects in a single SOSL query, returning matching records with selected fields and per-object limits to accelerate cross-object lookup.

Instructions

Searches across multiple Salesforce objects using SOSL (Salesforce Object Search Language). SOSL uses the search index and is faster than SOQL for cross-object text searches.

searchTerm: the text to search for objects: array of objects to search with optional fields list, e.g. [{ objectName: 'Account', fields: ['Id', 'Name'] }, { objectName: 'Contact', fields: ['Id', 'Name', 'Email'] }] searchGroup: where to search — ALL FIELDS (default), NAME FIELDS, EMAIL FIELDS, or PHONE FIELDS limit: max records per object (default: 20, max: 200)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results per object
objectsNoObjects to search across: strings or {objectName, fields} objects
searchTermYesSearch term (SOSL FIND clause value, no quotes needed)
objectTypesNoAlias for objects: array of object API name strings
Behavior4/5

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

Annotations already declare read-only, idempotent, and non-destructive behavior. The description adds value by explaining that SOSL uses the search index and is faster than SOQL, plus it details searchGroup and limit defaults. This goes beyond the structured fields, though it does not describe return format or pagination.

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

Conciseness4/5

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

The description is well-structured with a clear opening sentence followed by a parameter list. It is not overly verbose, but the inclusion of a non-existent parameter (searchGroup) means not every sentence earns its place, preventing a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main purpose, gives context on the search mechanism, and includes parameter examples. However, it fails to mention the objectTypes alias, includes a phantom searchGroup parameter, and does not explain the return structure. For a search tool with no output schema, this leaves notable gaps.

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

Parameters2/5

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

The description provides examples and defaults for objects and limit, but it references 'searchGroup' as a parameter that does not exist in the input schema. It also omits 'objectTypes' which is present in the schema as an alias. This introduces confusion and reduces the reliability of the parameter guidance.

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?

The description clearly states the tool searches across multiple Salesforce objects using SOSL, a specific verb and resource. It also differentiates from sibling tools by noting SOSL is faster than SOQL for cross-object text searches, which distinguishes it from sf_query_records.

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?

The description explicitly compares SOSL to SOQL, implying when to use this tool (cross-object text searches) and naming the alternative (SOQL). However, it does not explicitly state when not to use it or mention prerequisites, so it lacks the full 'when-not' guidance for a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/semwalajay83-sem/salesforce-metadata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server