Skip to main content
Glama

run_sosl_search

Execute SOSL searches on Salesforce to retrieve records matching specific criteria across all fields, enabling targeted data retrieval for analysis and processing.

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

  • Executes the SOSL search tool: extracts 'search' argument, calls sf_client.sf.search(), formats and returns JSON results as TextContent.
    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)}", ) ]
  • Registers the 'run_sosl_search' tool in @server.list_tools() with description and inputSchema requiring a 'search' string.
    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/leilaabdel/MCP-Salesforce'

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