Skip to main content
Glama

delete_record

Remove specific Salesforce records by specifying the object name and record ID. Use this tool from the salesforce-mcp server to manage data efficiently.

Instructions

Deletes a record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_nameYesThe name of the Salesforce object (e.g., 'Account', 'Contact')
record_idYesThe ID of the record to delete

Implementation Reference

  • Handler logic for the delete_record tool: validates inputs, retrieves the Salesforce object dynamically, deletes the record by ID using simple-salesforce, and returns the result as text content.
    elif name == "delete_record": object_name = arguments.get("object_name") record_id = arguments.get("record_id") if not object_name or not record_id: raise ValueError("Missing 'object_name' or 'record_id' argument") if not sf_client.sf: raise ValueError("Salesforce connection not established.") sf_object = getattr(sf_client.sf, object_name) results = sf_object.delete(record_id) return [ types.TextContent( type="text", text=f"Delete {object_name} Record Result: {results}", ) ]
  • Registration of the delete_record tool with MCP server, including name, description, and input schema defining required parameters object_name and record_id.
    types.Tool( name="delete_record", description="Deletes a record", inputSchema={ "type": "object", "properties": { "object_name": { "type": "string", "description": "The name of the Salesforce object (e.g., 'Account', 'Contact')", }, "record_id": { "type": "string", "description": "The ID of the record to delete", }, }, "required": ["object_name", "record_id"], }, ),
  • Input schema definition for the delete_record tool, specifying the object_name and record_id as required string parameters with descriptions.
    inputSchema={ "type": "object", "properties": { "object_name": { "type": "string", "description": "The name of the Salesforce object (e.g., 'Account', 'Contact')", }, "record_id": { "type": "string", "description": "The ID of the record to delete", }, }, "required": ["object_name", "record_id"], },

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