← salesforce-metadata-mcp

salesforce-metadata-mcp 3.0.0

npm · salesforce-metadata-mcp · current release

18
Tools
0
Resources
0
Templates
0
Prompts

Observation

Observed 2026-09-02T13:19:29.921Z using mcpSecurity-inventory. Status: succeeded. Negotiated protocol: 2025-06-18.

Server capabilities
{
  "tools": {
    "listChanged": true
  }
}

Tools 18

ToolCategoryAnnotationsRisk
sf_add_picklist_valuesAdds new picklist values to an existing Picklist or MultiselectPicklist field without removing existing values. Use when a user wants to add new options to a dropdown.
Input schema
{
  "type": "object",
  "properties": {
    "objectFieldFullName": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[A-Za-z][A-Za-z0-9_]*\\.[A-Za-z][A-Za-z0-9_]*__c$",
      "description": "Full API name of the picklist field, e.g. 'Invoice__c.Status__c'"
    },
    "values": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "API name for the picklist value (e.g. 'New')"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Display label for the value"
          },
          "default": {
            "type": "boolean",
            "default": false,
            "description": "Whether this is the default value"
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the value is active (default true)"
          },
          "color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$",
            "description": "Hex color code, e.g. '#FF0000'"
          },
          "description": {
            "type": "string",
            "maxLength": 1000,
            "description": "Optional description for the value"
          }
        },
        "required": [
          "fullName",
          "label"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "description": "New picklist values to add (existing values are preserved)"
    }
  },
  "required": [
    "objectFieldFullName",
    "values"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Writes · Non-destructive
sf_check_deploy_statusChecks the status of an in-progress or recently completed metadata deployment by async job ID. Returns the status (Pending, InProgress, Succeeded, Failed, Canceled), component successes, failures, and test results. Use with the deploy ID returned from sf_deploy_metadata.
Input schema
{
  "type": "object",
  "properties": {
    "deployId": {
      "type": "string",
      "minLength": 1,
      "description": "Deploy async job ID returned from sf_deploy_metadata"
    }
  },
  "required": [
    "deployId"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Read only · Non-destructive
sf_create_approval_processCreates or updates a Salesforce Approval Process via the Metadata API. Define who can submit, approval steps with approvers, entry criteria, and what happens on approval or rejection.
Input schema
{
  "type": "object",
  "properties": {
    "objectName": {
      "type": "string",
      "minLength": 1,
      "description": "Object API name, e.g. 'Opportunity' or 'Leave_Request__c'"
    },
    "processName": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      "description": "API name of the process, e.g. 'Large_Deal_Approval'"
    },
    "label": {
      "type": "string",
      "minLength": 1,
      "description": "Human-readable label, e.g. 'Large Deal Approval Process'"
    },
    "description": {
      "type": "string",
      "description": "Description of the approval process"
    },
    "allowedSubmitters": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Submitter type: 'owner', 'creator', 'role', 'group', 'user', 'allInternalUsers'"
          },
          "submitter": {
            "type": "string",
            "description": "API name or username (required for role/group/user types)"
          }
        },
        "required": [
          "type"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "description": "Who can submit: [{type:'owner'}] or [{type:'role', submitter:'SalesRep'}]"
    },
    "approvalSteps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "API name of the step, e.g. 'Manager_Approval'"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "description": "Display label, e.g. 'Manager Approval'"
          },
          "approvers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Approver type: 'user', 'role', 'queue', 'relatedUserField', 'userHierarchyField', 'adhoc'"
                },
                "name": {
                  "type": "string",
                  "description": "API name or username (not needed for adhoc/userHierarchyField)"
                }
              },
              "required": [
                "type"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "description": "Assigned approvers for this step"
          },
          "whenMultiple": {
            "type": "string",
            "enum": [
              "Unanimous",
              "FirstResponse"
            ],
            "default": "Unanimous",
            "description": "'Unanimous' = all must approve, 'FirstResponse' = first response wins"
          },
          "allowDelegate": {
            "type": "boolean",
            "default": true,
            "description": "Allow approvers to delegate"
          },
          "entryFormula": {
            "type": "string",
            "description": "Formula that must be true for this step to apply"
          },
          "ifCriteriaNotMet": {
            "type": "string",
            "enum": [
              "ApproveRecord",
              "RejectRecord",
              "GotoNextStep"
            ],
            "default": "GotoNextStep",
            "description": "What to do when entry formula is false"
          },
          "rejectBehavior": {
            "type": "string",
            "enum": [
              "RejectRequest",
              "BackToPrevious"
            ],
            "description": "On rejection (not for step 1): 'RejectRequest' or 'BackToPrevious'"
          }
        },
        "required": [
          "name",
          "label",
          "approvers"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "description": "Ordered list of approval steps"
    },
    "entryFormula": {
      "type": "string",
      "description": "Formula records must satisfy to enter this process"
    },
    "entryFilterCriteria": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Field API name, e.g. 'Amount'"
          },
          "operation": {
            "type": "string",
            "description": "Operation: 'greaterThan', 'equals', 'notEqual', etc."
          },
          "value": {
            "type": "string",
            "description": "Value to compare against"
          }
        },
        "required": [
          "field",
          "operation",
          "value"
        ],
        "additionalProperties": false
      },
      "description": "Filter criteria alternative to entryFormula"
    },
    "recordEditability": {
      "type": "string",
      "enum": [
        "AdminOnly",
        "AdminOrCurrentApprover"
      ],
      "default": "AdminOnly",
      "description": "Who can edit locked records during approval"
    },
    "allowRecall": {
      "type": "boolean",
      "default": true,
      "description": "Allow submitters to recall approval requests"
    },
    "finalApprovalLock": {
      "type": "boolean",
      "default": false,
      "description": "Lock record after final approval"
    },
    "finalRejectionLock": {
      "type": "boolean",
      "default": false,
      "description": "Lock record after final rejection"
    },
    "emailTemplate": {
      "type": "string",
      "description": "Email template for approval notifications, e.g. 'unfiled$public/ApprovalEmail'"
    },
    "active": {
      "type": "boolean",
      "default": false,
      "description": "Activate immediately (warning: cannot change steps after activation)"
    }
  },
  "required": [
    "objectName",
    "processName",
    "label",
    "allowedSubmitters",
    "approvalSteps"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Writes · Non-destructive
sf_create_custom_fieldCreates a new custom field on an existing Salesforce object. The field API name must end with '__c'. Supports all field types: Text, Number, Picklist, Lookup, etc.
Input schema
{
  "type": "object",
  "properties": {
    "objectName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "API name of the parent object, e.g. 'Account' or 'Invoice__c'"
    },
    "fieldName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[A-Za-z][A-Za-z0-9_]*__c$",
      "description": "API name of the field, e.g. 'Status__c'"
    },
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Display label for the field, e.g. 'Status'"
    },
    "type": {
      "type": "string",
      "enum": [
        "Text",
        "TextArea",
        "LongTextArea",
        "Html",
        "Number",
        "Currency",
        "Percent",
        "Checkbox",
        "Date",
        "DateTime",
        "Email",
        "Phone",
        "Url",
        "Picklist",
        "MultiselectPicklist",
        "Lookup",
        "MasterDetail"
      ],
      "description": "Salesforce field type"
    },
    "description": {
      "type": "string",
      "maxLength": 1000,
      "description": "Optional description for the field"
    },
    "required": {
      "type": "boolean",
      "description": "Whether the field is required on page layouts"
    },
    "unique": {
      "type": "boolean",
      "description": "Whether values must be unique (Text, Number, Email)"
    },
    "externalId": {
      "type": "boolean",
      "description": "Whether this field is an external ID"
    },
    "length": {
      "type": "integer",
      "minimum": 1,
      "maximum": 131072,
      "description": "Max length. Text/TextArea: 1–255 (default 255). LongTextArea/Html (Text Area Long / Rich Text Area): 256–131072 (default 32768)."
    },
    "visibleLines": {
      "type": "integer",
      "minimum": 2,
      "maximum": 50,
      "description": "Visible lines. Required for LongTextArea and Html (Text Area Long / Rich Text Area) — default 10. Also used for MultiselectPicklist."
    },
    "precision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 18,
      "description": "Total digits for Number/Currency/Percent (1–18)"
    },
    "scale": {
      "type": "integer",
      "minimum": 0,
      "maximum": 17,
      "description": "Decimal places for Number/Currency/Percent (0–17)"
    },
    "picklistValues": {
      "type": "object",
      "properties": {
        "restricted": {
          "type": "boolean",
          "default": false,
          "description": "If true, only values in the list are allowed"
        },
        "sorted": {
          "type": "boolean",
          "default": false,
          "description": "Whether values are auto-sorted alphabetically"
        },
        "values": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "fullName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "API name for the picklist value (e.g. 'New')"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Display label for the value"
              },
              "default": {
                "type": "boolean",
                "default": false,
                "description": "Whether this is the default value"
              },
              "isActive": {
                "type": "boolean",
                "description": "Whether the value is active (default true)"
              },
              "color": {
                "type": "string",
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "description": "Hex color code, e.g. '#FF0000'"
              },
              "description": {
                "type": "string",
                "maxLength": 1000,
                "description": "Optional description for the value"
              }
            },
            "required": [
              "fullName",
              "label"
            ],
            "additionalProperties": false
          },
          "minItems": 1,
          "description": "List of picklist values"
        }
      },
      "required": [
        "values"
      ],
      "additionalProperties": false,
      "description": "Picklist configuration. Required for Picklist / MultiselectPicklist types."
    },
    "referenceTo": {
      "type": "string",
      "description": "Target object API name for Lookup/MasterDetail, e.g. 'Account'"
    },
    "relationshipLabel": {
      "type": "string",
      "description": "Label for the relationship on the related object"
    },
    "relationshipName": {
      "type": "string",
      "description": "API name for the relationship (no spaces)"
    },
    "deleteConstraint": {
      "type": "string",
      "enum": [
        "Cascade",
        "Restrict",
        "SetNull"
      ],
      "description": "Delete behaviour for Lookup fields: 'Cascade', 'Restrict', or 'SetNull'"
    },
    "defaultValue": {
      "type": [
        "boolean",
        "string"
      ],
      "description": "Default value for the field. Use true/false for Checkbox fields."
    }
  },
  "required": [
    "objectName",
    "fieldName",
    "label",
    "type"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Writes · Non-destructive
sf_create_custom_objectCreates a new Salesforce Custom Object using the Metadata API. The object name must end with '__c'. Use this when a user asks to create a new object, entity, or table in Salesforce.
Input schema
{
  "type": "object",
  "properties": {
    "fullName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[A-Za-z][A-Za-z0-9_]*__c$",
      "description": "API name of the custom object, e.g. 'Invoice__c'"
    },
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Singular label shown in the UI, e.g. 'Invoice'"
    },
    "pluralLabel": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Plural label, e.g. 'Invoices'"
    },
    "description": {
      "type": "string",
      "maxLength": 1000,
      "description": "Optional description for the object"
    },
    "nameFieldLabel": {
      "type": "string",
      "maxLength": 255,
      "default": "Name",
      "description": "Label for the standard Name field, e.g. 'Invoice Name'"
    },
    "nameFieldType": {
      "type": "string",
      "enum": [
        "Text",
        "AutoNumber"
      ],
      "default": "Text",
      "description": "Type of Name field: 'Text' (free-form) or 'AutoNumber' (auto-increment)"
    },
    "autoNumberFormat": {
      "type": "string",
      "description": "Format for AutoNumber name field, e.g. 'INV-{0000}'. Required when nameFieldType is AutoNumber."
    },
    "deploymentStatus": {
      "type": "string",
      "enum": [
        "Deployed",
        "InDevelopment"
      ],
      "default": "Deployed",
      "description": "Deployment status of the object"
    },
    "sharingModel": {
      "type": "string",
      "enum": [
        "ReadWrite",
        "Read",
        "Private",
        "ControlledByParent",
        "FullAccess"
      ],
      "default": "ReadWrite",
      "description": "OWD sharing model for the object"
    },
    "enableActivities": {
      "type": "boolean",
      "default": true,
      "description": "Allow activities (tasks/events) on this object"
    },
    "enableHistory": {
      "type": "boolean",
      "default": false,
      "description": "Enable field history tracking"
    },
    "enableReports": {
      "type": "boolean",
      "default": true,
      "description": "Make the object available for reports"
    },
    "enableSearch": {
      "type": "boolean",
      "default": true,
      "description": "Enable search on this object"
    }
  },
  "required": [
    "fullName",
    "label",
    "pluralLabel"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Writes · Non-destructive
sf_create_formula_fieldCreates a formula field on any Salesforce object. Supports all return types (Text, Number, Currency, Date, DateTime, Checkbox, Percent) and the full Salesforce formula language: IF/AND/OR/NOT, BLANKVALUE, TEXT, VALUE, DATE, DATEVALUE, TODAY, NOW, date functions (MONTH/YEAR/DAY), math (FLOOR/CEILING/MOD), string functions (LEN/LEFT/RIGHT/MID/TRIM/UPPER/LOWER/CONTAINS/BEGINS), record type and picklist functions (ISPICKVAL, ISNULL, ISBLANK), cross-object field references (e.g. Account.Owner.Name), and VLOOKUP. Complex multi-line formulas are fully supported.
Input schema
{
  "type": "object",
  "properties": {
    "objectApiName": {
      "type": "string",
      "minLength": 1,
      "description": "Object API name, e.g. 'Opportunity'"
    },
    "fieldName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40,
      "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      "description": "Field name without __c suffix"
    },
    "label": {
      "type": "string",
      "minLength": 1,
      "description": "Field label"
    },
    "returnType": {
      "type": "string",
      "enum": [
        "Text",
        "Number",
        "Currency",
        "Date",
        "DateTime",
        "Checkbox",
        "Percent"
      ],
      "description": "Formula return type"
    },
    "formula": {
      "type": "string",
      "minLength": 1,
      "description": "Salesforce formula expression. Supports all Salesforce formula functions: IF, AND, OR, NOT, BLANKVALUE, TEXT, VALUE, DATE, DATEVALUE, TODAY, NOW, MONTH, YEAR, DAY, FLOOR, CEILING, MOD, LEN, LEFT, RIGHT, MID, TRIM, UPPER, LOWER, CONTAINS, BEGINS, ISPICKVAL, ISNULL, ISBLANK, cross-object fields (e.g. Account.Owner.Name), etc."
    },
    "formulaTreatBlanksAs": {
      "type": "string",
      "enum": [
        "BlankAsZero",
        "BlankAsLogicalFalse"
      ],
      "description": "How to treat blank fields in the formula. Defaults to BlankAsZero for numeric types, BlankAsLogicalFalse for Checkbox."
    },
    "precision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 18,
      "description": "Total number of digits for Number/Currency/Percent return types (default 18)"
    },
    "scale": {
      "type": "integer",
      "minimum": 0,
      "maximum": 18,
      "description": "Decimal places for Number/Currency/Percent return types"
    },
    "description": {
      "type": "string",
      "description": "Field description"
    }
  },
  "required": [
    "objectApiName",
    "fieldName",
    "label",
    "returnType",
    "formula"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Writes · Non-destructive
sf_create_validation_ruleCreates or updates a Salesforce Validation Rule on any object via the Metadata API. The errorConditionFormula returns TRUE when data is INVALID. Use for data quality enforcement.
Input schema
{
  "type": "object",
  "properties": {
    "objectName": {
      "type": "string",
      "minLength": 1,
      "description": "Object API name, e.g. 'Account', 'Opportunity', 'Invoice__c'"
    },
    "ruleName": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      "description": "API name for the rule, e.g. 'Require_Close_Date'"
    },
    "errorConditionFormula": {
      "type": "string",
      "minLength": 1,
      "description": "Formula returning TRUE when data is INVALID, e.g. \"AND(ISPICKVAL(StageName,'Closed Won'),ISBLANK(CloseDate))\""
    },
    "errorMessage": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Error shown to user when validation fails (max 255 chars)"
    },
    "errorDisplayField": {
      "type": "string",
      "description": "Field API name to display error next to, e.g. 'CloseDate'. Blank = top of page."
    },
    "description": {
      "type": "string",
      "description": "Description of this validation rule"
    },
    "active": {
      "type": "boolean",
      "default": true,
      "description": "Whether the rule is active"
    }
  },
  "required": [
    "objectName",
    "ruleName",
    "errorConditionFormula",
    "errorMessage"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Writes · Non-destructive
sf_create_workflow_field_updateCreates a Workflow Field Update action that can be referenced by Approval Processes, Workflow Rules, or Flows. Sets a field to a literal value, formula result, or null.
Input schema
{
  "type": "object",
  "properties": {
    "objectName": {
      "type": "string",
      "minLength": 1,
      "description": "Object API name, e.g. 'Opportunity'"
    },
    "actionName": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      "description": "API name of the action, e.g. 'Set_Stage_Closed_Won'"
    },
    "label": {
      "type": "string",
      "minLength": 1,
      "description": "Human-readable label"
    },
    "field": {
      "type": "string",
      "minLength": 1,
      "description": "Field API name to update, e.g. 'StageName'"
    },
    "literalValue": {
      "type": "string",
      "description": "Literal string/picklist value to set"
    },
    "formula": {
      "type": "string",
      "description": "Formula for the new value, e.g. 'TODAY()'"
    },
    "nullValue": {
      "type": "boolean",
      "default": false,
      "description": "Set the field to null/blank"
    },
    "notifyAssignee": {
      "type": "boolean",
      "default": false,
      "description": "Notify owner/assignee after update"
    }
  },
  "required": [
    "objectName",
    "actionName",
    "label",
    "field"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Writes · Non-destructive
sf_delete_metadataPermanently deletes one or more metadata components of a given type via the Metadata API's deleteMetadata call — works for CustomObject, CustomField, Flow, GenAiFunction, GenAiPlugin, GenAiPlannerBundle, Bot, ApexClass, and most other metadata types. There was previously no way to remove anything created by this MCP server (sf_deploy_metadata only supports adding/updating components, not destructiveChanges) — diagnostic or abandoned metadata had nowhere to go. Deletes each fullName independently: check the response's deleted/errors lists rather than assuming all all-or-nothing. Some types have dependency order requirements (e.g. delete a Bot's GenAiFunction/GenAiPlugin/GenAiPlannerBundle before the Bot itself, delete CustomField before its parent CustomObject) — Salesforce will reject a delete that still has dependents, naming them in the error.
Input schema
{
  "type": "object",
  "properties": {
    "metadataType": {
      "type": "string",
      "minLength": 1,
      "description": "Metadata type to delete, e.g. 'CustomObject', 'CustomField', 'Flow', 'GenAiFunction', 'GenAiPlugin', 'GenAiPlannerBundle', 'Bot'"
    },
    "fullNames": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "maxItems": 200,
      "description": "Full names of the components to delete, e.g. ['My_Object__c'] or ['My_Object__c.My_Field__c']. Deletes each independently — some may succeed while others fail; check the response's deleted/errors lists rather than assuming all-or-nothing."
    }
  },
  "required": [
    "metadataType",
    "fullNames"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": true,
  "idempotentHint": true,
  "openWorldHint": true
}
Writes · Destructive
sf_deploy_metadataDeploys a set of metadata components directly to the org using the Metadata API SOAP deploy operation. Builds a package.xml and deployment zip in memory. Supports validate-only (checkOnly:true) for pre-deployment validation without making changes. Specify runTests to execute test classes during deployment (required for production). Polls until complete or timeout.
Input schema
{
  "type": "object",
  "properties": {
    "components": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Metadata type, e.g. 'CustomObject', 'ApexClass', 'Flow', 'CustomField'"
          },
          "name": {
            "type": "string",
            "description": "Component API name, e.g. 'Account', 'MyClass', 'My_Flow'"
          }
        },
        "required": [
          "type",
          "name"
        ],
        "additionalProperties": false
      },
      "default": [],
      "description": "Metadata components to include in the deployment package. These reference components already in the org. Can be empty when using componentsXml to deploy new/updated components with inline XML."
    },
    "componentsXml": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Metadata type, e.g. 'Flow', 'ApexClass', 'CustomObject'"
          },
          "name": {
            "type": "string",
            "description": "Component API name, e.g. 'My_Flow', 'MyClass'"
          },
          "xml": {
            "type": "string",
            "description": "Complete XML content for this component (the full metadata file content, not just a fragment)"
          }
        },
        "required": [
          "type",
          "name",
          "xml"
        ],
        "additionalProperties": false
      },
      "description": "Optional inline XML components to deploy. Each entry provides the complete XML definition (type, name, xml). The file path is inferred from type/name. When provided alongside components, both are deployed together."
    },
    "checkOnly": {
      "type": "boolean",
      "default": false,
      "description": "Validate only, do not actually deploy"
    },
    "runTests": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Test classes to run during deployment"
    },
    "rollbackOnError": {
      "type": "boolean",
      "default": true,
      "description": "Roll back all changes if any component fails"
    },
    "waitMinutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60,
      "default": 10,
      "description": "Max minutes to wait for deploy to complete"
    },
    "testLevel": {
      "type": "string",
      "enum": [
        "NoTestRun",
        "RunSpecifiedTests",
        "RunLocalTests",
        "RunAllTestsInOrg"
      ],
      "description": "Test level: NoTestRun, RunSpecifiedTests, RunLocalTests, or RunAllTestsInOrg"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Writes · Non-destructive
sf_describe_objectRetrieves schema metadata for a Salesforce object via the REST Describe API: fields (name, label, type, required, picklist values, length, references), child relationships, and record type info. Call this before querying or creating records on an unfamiliar object, or when a user asks what fields exist on an object. objectApiName: SObject API name, e.g. 'Account', 'My_Object__c' fieldsOnly: set true for a smaller/faster response with just the field list, omitting child relationships and record types waitForFields: field API names to poll for after a sf_create_custom_field call — Salesforce's own REST describe/SOQL schema cache can lag several minutes behind the Metadata API on some orgs even though the field is fully deployed; this retries so you don't have to. Not caused by this MCP server and not fixable here — it's Salesforce-side. timeoutSeconds: max time to poll when waitForFields is set (default 60, max 300)
Input schema
{
  "type": "object",
  "properties": {
    "objectApiName": {
      "type": "string",
      "minLength": 1,
      "description": "SObject API name to describe, e.g. 'Account', 'My_Object__c'"
    },
    "fieldsOnly": {
      "type": "boolean",
      "default": false,
      "description": "If true, returns only the field list (name, label, type, required, picklist values) and omits child relationships/record type info — use for a smaller, faster response when you only need field names/types before a query or DML call."
    },
    "waitForFields": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Field API names to wait for. Salesforce's own REST describe/SOQL schema cache can lag several minutes behind a metadata deploy on some orgs (confirmed live 2026-07-31: a field visible via Tooling API and the Metadata API can still be invisible to REST describe and SOQL long after creation) — this isn't caused by anything in this MCP server (no caching happens here; every call is a fresh HTTP request), so it can't be fixed client-side, only worked around. When set, retries describe until every named field appears or timeoutSeconds elapses, instead of you polling manually."
    },
    "timeoutSeconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 300,
      "default": 60,
      "description": "Max time to poll when waitForFields is set. Ignored otherwise."
    }
  },
  "required": [
    "objectApiName"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Read only · Non-destructive
sf_find_toolSearches all 228 Salesforce tools by name — including tools in toolsets that are not loaded — and by default loads whichever toolsets contain the matches, so you can call them immediately. Use this whenever a tool you expect does not appear in the tool list, or when you do not know which toolset a capability lives in. Example queries: "flow", "permission set", "agent", "omniscript", "debug log".
Input schema
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 2,
      "description": "What you are looking for, e.g. \"validation rule\" or \"create flow\"."
    },
    "autoLoad": {
      "type": "boolean",
      "default": true,
      "description": "Load the toolsets containing the matches so they become callable straight away. Default true."
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Writes · Non-destructive
sf_get_metadata_dependenciesAnswers "what breaks if I change this?" for any metadata component. Read-only — it changes nothing. Returns every component that REFERENCES the target (Apex classes, triggers, flows, validation rules, layouts, report types, formulas), grouped by type. For custom fields it also reports how many records currently hold a value, which is usually the deciding factor in whether a change is safe. componentType + componentName: e.g. CustomField + 'Account.Revenue__c', or ApexClass + 'AccountService' componentId: alternatively pass the Salesforce Id directly (needed for types outside the supported list) includeUses: also return what the component itself depends on Run this BEFORE deleting or reshaping anything that holds data. Note the blindSpots list returned with every response: this API cannot see dynamic SOQL, string-built field names, managed-package internals, or external integrations, so an empty result means "nothing found", never "safe to change".
Input schema
{
  "type": "object",
  "properties": {
    "componentType": {
      "type": "string",
      "description": "Metadata type: CustomField, CustomObject, ApexClass, ApexTrigger, Flow, ValidationRule, Layout, PermissionSet, LightningComponentBundle, AuraDefinitionBundle, StaticResource, ApexPage, ApexComponent"
    },
    "componentName": {
      "type": "string",
      "description": "Component API name. For CustomField use 'Object.Field__c', e.g. 'Account.Revenue__c'."
    },
    "componentId": {
      "type": "string",
      "description": "Salesforce Id of the component, as an alternative to type+name (required for types not in the supported list)."
    },
    "includeUses": {
      "type": "boolean",
      "default": false,
      "description": "Also return what this component itself depends on (the reverse direction)."
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Read only · Non-destructive
sf_list_objectsFinds Salesforce objects by PARTIAL name or label — the discovery step before sf_describe_object, which needs an exact API name you may not know yet. Use this whenever the user refers to objects loosely ("what objects handle cases?", "is there a custom object for invoices?", "show me the custom objects") rather than by exact API name. searchTerm: partial API name or label, case-insensitive. Omit to list every object in the org. objectType: 'all' (default), 'custom' (only __c), or 'standard' queryableOnly: true to hide objects that cannot be queried with SOQL limit: max results (default 50) Results rank exact matches first, then prefix matches, then substring matches, so a search for "Account" returns Account before AccountBrandShare. Returns name, label, keyPrefix and CRUD-ability per object; call sf_describe_object with an exact name for full field detail.
Input schema
{
  "type": "object",
  "properties": {
    "searchTerm": {
      "type": "string",
      "description": "Partial API name or label to match, case-insensitive. Omit to list everything. Results rank exact matches first, then prefix, then substring."
    },
    "objectType": {
      "type": "string",
      "enum": [
        "all",
        "custom",
        "standard"
      ],
      "default": "all",
      "description": "Restrict to custom or standard objects"
    },
    "queryableOnly": {
      "type": "boolean",
      "default": false,
      "description": "Only return objects that support SOQL queries"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500,
      "default": 50,
      "description": "Maximum objects to return"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Read only · Non-destructive
sf_list_toolsetsLists every available Salesforce toolset, how many tools each contains, and which are currently loaded. This server keeps most of its 228 tools unloaded to save context; unloaded tools do not appear in the tool list until you load their toolset with sf_load_toolset. Call this when you need a capability you cannot see.
Input schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {}
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Read only · Non-destructive
sf_load_toolsetLoads one or more Salesforce toolsets, making their tools callable and visible in the tool list. Available toolsets: core, metadata, objects, data, flows, automation, security, apex, lwc, ui, pages, actions, agentforce, omnistudio, omnichannel, devops, deployment, integrations, identity, reports, experience, admin, monitoring, audit, einstein, knowledge, cpq, sandbox, streaming, visualforce, aura, comms, mcp, i18n. Call sf_list_toolsets for descriptions and tool counts.
Input schema
{
  "type": "object",
  "properties": {
    "toolsets": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "description": "Toolset names to load. One or more of: core, metadata, objects, data, flows, automation, security, apex, lwc, ui, pages, actions, agentforce, omnistudio, omnichannel, devops, deployment, integrations, identity, reports, experience, admin, monitoring, audit, einstein, knowledge, cpq, sandbox, streaming, visualforce, aura, comms, mcp, i18n"
    }
  },
  "required": [
    "toolsets"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
Writes · Non-destructive
sf_query_recordsExecutes a SOQL query against the org and returns matching records. Provide the full SOQL string in the query param. Use for reading data, checking existing records before creating, or verifying changes. Supports aggregate queries — GROUP BY with COUNT(), SUM(), AVG(), MAX(), MIN(), e.g.: 'SELECT StageName, COUNT(Id), SUM(Amount) FROM Opportunity GROUP BY StageName' Aggregate results come back as regular records with the aggregate expressions as field keys (e.g. "expr0").
Input schema
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Full SOQL query string, e.g. 'SELECT Id, Name FROM Account WHERE Industry = \\'Technology\\' LIMIT 10'"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2000,
      "default": 200,
      "description": "Maximum records to return (default 200)"
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Read only · Non-destructive
sf_retrieve_metadataRetrieves metadata components from the org and returns their actual file contents. Use this to read existing configuration before making changes, to back up metadata, or to check what is really deployed rather than what you think is deployed. Waits for the async retrieve to finish and unpacks the resulting zip, returning each file's path and source. Large files are truncated. Accepts 'components' (array), or 'metadataType'+'componentName' as a single-item shortcut, or a raw 'packageXml' document — provide exactly one form.
Input schema
{
  "type": "object",
  "properties": {
    "components": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Metadata type, e.g. 'CustomObject', 'ApexClass', 'Flow', 'CustomField'"
          },
          "name": {
            "type": "string",
            "description": "Component API name, e.g. 'Account', 'MyClass', 'My_Flow'"
          }
        },
        "required": [
          "type",
          "name"
        ],
        "additionalProperties": false
      },
      "description": "Metadata components to retrieve"
    },
    "metadataType": {
      "type": "string",
      "description": "Single metadata type (alternative to components array)"
    },
    "componentName": {
      "type": "string",
      "description": "Single component name (used with metadataType)"
    },
    "packageXml": {
      "type": "string",
      "description": "Raw package.xml content for selective retrieve. If provided, components list is ignored."
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Annotations
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": true
}
Read only · Non-destructive

Resources 0

Resource templates 0

Prompts 0

Let’s talk about MCP security.

Share your details and our security team will contact you.