Skip to main content
Glama
ampcome-mcps

MCP Salesforce Connector

by ampcome-mcps

run_sosl_search

Execute SOSL searches in Salesforce to find records matching specific keywords across all fields. Input a search query to retrieve relevant data efficiently.

Instructions

Executes a SOSL search against Salesforce

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchYesThe SOSL search to execute (e.g., 'FIND {John Smith} IN ALL FIELDS')

Implementation Reference

  • Handler implementation that extracts the 'search' argument, performs SOSL search via Salesforce client, and returns formatted JSON results.
    elif name == "run_sosl_search": search = arguments.get("search") if not search: raise ValueError("Missing 'search' argument") results = sf_client.sf.search(search) return [ types.TextContent( type="text", text=f"SOSL Search Results (JSON):\n{json.dumps(results, indent=2)}", ) ]
  • JSON Schema defining the input for the run_sosl_search tool: requires a 'search' string parameter.
    inputSchema={ "type": "object", "properties": { "search": { "type": "string", "description": "The SOSL search to execute (e.g., 'FIND {John Smith} IN ALL FIELDS')", }, }, "required": ["search"], },
  • Registration of the run_sosl_search tool in the MCP server's list_tools handler, including name, description, and schema.
    types.Tool( name="run_sosl_search", description="Executes a SOSL search against Salesforce", inputSchema={ "type": "object", "properties": { "search": { "type": "string", "description": "The SOSL search to execute (e.g., 'FIND {John Smith} IN ALL FIELDS')", }, }, "required": ["search"], }, ),

Other Tools

Related 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/ampcome-mcps/salesforce-mcp'

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