Salesforce MCP Server

salesforce_manage_field

Create new custom fields or modify existing fields on any Salesforce object:

  • Field Types: Text, Number, Date, Lookup, Master-Detail, Picklist etc.
  • Properties: Required, Unique, External ID, Length, Scale etc.
  • Relationships: Create lookups and master-detail relationships Examples: Add Rating__c picklist to Account, Create Account lookup on Custom Object Note: Changes affect metadata and require proper permissions

Input Schema

NameRequiredDescriptionDefault
deleteConstraintNoDelete constraint for Lookup fields
descriptionNoDescription of the field
externalIdNoWhether the field is an external ID
fieldNameYesAPI name for the field (without __c suffix)
labelNoLabel for the field
lengthNoLength for text fields
objectNameYesAPI name of the object to add/modify the field
operationYesWhether to create new field or update existing
picklistValuesNoValues for Picklist/MultiselectPicklist fields
precisionNoPrecision for numeric fields
referenceToNoAPI name of the object to reference (for Lookup/MasterDetail)
relationshipLabelNoLabel for the relationship (for Lookup/MasterDetail)
relationshipNameNoAPI name for the relationship (for Lookup/MasterDetail)
requiredNoWhether the field is required
scaleNoScale for numeric fields
typeNoField type (required for create)
uniqueNoWhether the field value must be unique

Input Schema (JSON Schema)

{ "properties": { "deleteConstraint": { "description": "Delete constraint for Lookup fields", "enum": [ "Cascade", "Restrict", "SetNull" ], "optional": true, "type": "string" }, "description": { "description": "Description of the field", "optional": true, "type": "string" }, "externalId": { "description": "Whether the field is an external ID", "optional": true, "type": "boolean" }, "fieldName": { "description": "API name for the field (without __c suffix)", "type": "string" }, "label": { "description": "Label for the field", "optional": true, "type": "string" }, "length": { "description": "Length for text fields", "optional": true, "type": "number" }, "objectName": { "description": "API name of the object to add/modify the field", "type": "string" }, "operation": { "description": "Whether to create new field or update existing", "enum": [ "create", "update" ], "type": "string" }, "picklistValues": { "description": "Values for Picklist/MultiselectPicklist fields", "items": { "properties": { "isDefault": { "optional": true, "type": "boolean" }, "label": { "type": "string" } }, "type": "object" }, "optional": true, "type": "array" }, "precision": { "description": "Precision for numeric fields", "optional": true, "type": "number" }, "referenceTo": { "description": "API name of the object to reference (for Lookup/MasterDetail)", "optional": true, "type": "string" }, "relationshipLabel": { "description": "Label for the relationship (for Lookup/MasterDetail)", "optional": true, "type": "string" }, "relationshipName": { "description": "API name for the relationship (for Lookup/MasterDetail)", "optional": true, "type": "string" }, "required": { "description": "Whether the field is required", "optional": true, "type": "boolean" }, "scale": { "description": "Scale for numeric fields", "optional": true, "type": "number" }, "type": { "description": "Field type (required for create)", "enum": [ "Checkbox", "Currency", "Date", "DateTime", "Email", "Number", "Percent", "Phone", "Picklist", "MultiselectPicklist", "Text", "TextArea", "LongTextArea", "Html", "Url", "Lookup", "MasterDetail" ], "optional": true, "type": "string" }, "unique": { "description": "Whether the field value must be unique", "optional": true, "type": "boolean" } }, "required": [ "operation", "objectName", "fieldName" ], "type": "object" }