Skip to main content
Glama
ampcome-mcps

MCP Salesforce Connector

by ampcome-mcps

create_record

Create new Salesforce records by specifying object type and data fields to add information to your CRM database.

Instructions

Creates a new record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_nameYesThe name of the Salesforce object (e.g., 'Account', 'Contact')
dataYesThe data for the new record

Implementation Reference

  • Registers the 'create_record' tool in the list_tools handler, including its name, description, and input schema.
    types.Tool( name="create_record", description="Creates a new record", inputSchema={ "type": "object", "properties": { "object_name": { "type": "string", "description": "The name of the Salesforce object (e.g., 'Account', 'Contact')", }, "data": { "type": "object", "description": "The data for the new record", "properties": {}, "additionalProperties": True, }, }, "required": ["object_name", "data"], }, ),
  • Implements the handler logic for 'create_record' tool: validates arguments, connects to Salesforce object, calls create() method, and returns the result as JSON.
    elif name == "create_record": object_name = arguments.get("object_name") data = arguments.get("data") if not object_name or not data: raise ValueError("Missing 'object_name' or 'data' argument") if not sf_client.sf: raise ValueError("Salesforce connection not established.") sf_object = getattr(sf_client.sf, object_name) results = sf_object.create(data) return [ types.TextContent( type="text", text=f"Create {object_name} Record Result (JSON):\n{json.dumps(results, indent=2)}", ) ]

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