salesforce-metadata-mcp
v3.2.1The only Salesforce MCP with Agentforce, OmniStudio & DevOps Center tools — 228 total.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
sf_create_custom_object Create Salesforce Custom Object
Creates 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.
| Parameter | Type | Description |
|---|---|---|
fullName * | string | API name of the custom object, e.g. 'Invoice__c' |
label * | string | Singular label shown in the UI, e.g. 'Invoice' |
pluralLabel * | string | Plural label, e.g. 'Invoices' |
autoNumberFormat | string | Format for AutoNumber name field, e.g. 'INV-{0000}'. Required when nameFieldType is AutoNumber. |
deploymentStatus | string | Deployment status of the object |
description | string | Optional description for the object |
enableActivities | boolean | Allow activities (tasks/events) on this object |
enableHistory | boolean | Enable field history tracking |
enableReports | boolean | Make the object available for reports |
enableSearch | boolean | Enable search on this object |
nameFieldLabel | string | Label for the standard Name field, e.g. 'Invoice Name' |
nameFieldType | string | Type of Name field: 'Text' (free-form) or 'AutoNumber' (auto-increment) |
sharingModel | string | OWD sharing model for the object |
sf_create_custom_field Create Salesforce Custom Field
Creates 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.
| Parameter | Type | Description |
|---|---|---|
fieldName * | string | API name of the field, e.g. 'Status__c' |
label * | string | Display label for the field, e.g. 'Status' |
objectName * | string | API name of the parent object, e.g. 'Account' or 'Invoice__c' |
type * | string | Salesforce field type |
defaultValue | boolean | string | Default value for the field. Use true/false for Checkbox fields. |
deleteConstraint | string | Delete behaviour for Lookup fields: 'Cascade', 'Restrict', or 'SetNull' |
description | string | Optional description for the field |
externalId | boolean | Whether this field is an external ID |
length | integer | Max length. Text/TextArea: 1–255 (default 255). LongTextArea/Html (Text Area Long / Rich Text Area): 256–131072 (default 32768). |
picklistValues | Picklist values. Either a plain list (['Draft','Open']) or the full { restricted, sorted, values } object. Required for Picklist / MultiselectPicklist types. | |
precision | integer | Total digits for Number/Currency/Percent (1–18) |
referenceTo | string | Target object API name for Lookup/MasterDetail, e.g. 'Account' |
relationshipLabel | string | Label for the relationship on the related object |
relationshipName | string | API name for the relationship (no spaces) |
required | boolean | Whether the field is required on page layouts |
scale | integer | Decimal places for Number/Currency/Percent (0–17) |
unique | boolean | Whether values must be unique (Text, Number, Email) |
visibleLines | integer | Visible lines. Required for LongTextArea and Html (Text Area Long / Rich Text Area) — default 10. Also used for MultiselectPicklist. |
sf_add_picklist_values Add Picklist Values to Existing Field
Adds 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.
| Parameter | Type | Description |
|---|---|---|
objectFieldFullName * | string | Full API name of the picklist field, e.g. 'Invoice__c.Status__c' |
values * | array | New picklist values to add (existing values are preserved) |
sf_create_approval_process Create Salesforce Approval Process
Creates 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.
| Parameter | Type | Description |
|---|---|---|
allowedSubmitters * | array | Who can submit: [{type:'owner'}] or [{type:'role', submitter:'SalesRep'}] |
approvalSteps * | array | Ordered list of approval steps |
label * | string | Human-readable label, e.g. 'Large Deal Approval Process' |
objectName * | string | Object API name, e.g. 'Opportunity' or 'Leave_Request__c' |
processName * | string | API name of the process, e.g. 'Large_Deal_Approval' |
active | boolean | Activate immediately (warning: cannot change steps after activation) |
allowRecall | boolean | Allow submitters to recall approval requests |
description | string | Description of the approval process |
emailTemplate | string | Email template for approval notifications, e.g. 'unfiled$public/ApprovalEmail' |
entryFilterCriteria | array | Filter criteria alternative to entryFormula |
entryFormula | string | Formula records must satisfy to enter this process |
finalApprovalLock | boolean | Lock record after final approval |
finalRejectionLock | boolean | Lock record after final rejection |
recordEditability | string | Who can edit locked records during approval |
sf_create_validation_rule Create Salesforce Validation Rule
Creates 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.
| Parameter | Type | Description |
|---|---|---|
errorConditionFormula * | string | Formula returning TRUE when data is INVALID, e.g. "AND(ISPICKVAL(StageName,'Closed Won'),ISBLANK(CloseDate))" |
errorMessage * | string | Error shown to user when validation fails (max 255 chars) |
objectName * | string | Object API name, e.g. 'Account', 'Opportunity', 'Invoice__c' |
ruleName * | string | API name for the rule, e.g. 'Require_Close_Date' |
active | boolean | Whether the rule is active |
description | string | Description of this validation rule |
errorDisplayField | string | Field API name to display error next to, e.g. 'CloseDate'. Blank = top of page. |
sf_create_workflow_field_update Create Salesforce Workflow Field Update Action
Creates 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.
| Parameter | Type | Description |
|---|---|---|
actionName * | string | API name of the action, e.g. 'Set_Stage_Closed_Won' |
field * | string | Field API name to update, e.g. 'StageName' |
label * | string | Human-readable label |
objectName * | string | Object API name, e.g. 'Opportunity' |
formula | string | Formula for the new value, e.g. 'TODAY()' |
literalValue | string | Literal string/picklist value to set |
notifyAssignee | boolean | Notify owner/assignee after update |
nullValue | boolean | Set the field to null/blank |
sf_create_formula_field Create Formula Field
Creates 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.
| Parameter | Type | Description |
|---|---|---|
fieldName * | string | Field name without __c suffix |
formula * | string | 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, RIGH… |
label * | string | Field label |
objectApiName * | string | Object API name, e.g. 'Opportunity' |
returnType * | string | Formula return type |
description | string | Field description |
formulaTreatBlanksAs | string | How to treat blank fields in the formula. Defaults to BlankAsZero for numeric types, BlankAsLogicalFalse for Checkbox. |
precision | integer | Total number of digits for Number/Currency/Percent return types (default 18) |
scale | integer | Decimal places for Number/Currency/Percent return types |
sf_deploy_metadata Deploy Metadata
Deploys 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.
| Parameter | Type | Description |
|---|---|---|
checkOnly | boolean | Validate only, do not actually deploy |
components | array | 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 | array | 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 depl… |
rollbackOnError | boolean | Roll back all changes if any component fails |
runTests | array | Test classes to run during deployment |
testLevel | string | Test level: NoTestRun, RunSpecifiedTests, RunLocalTests, or RunAllTestsInOrg |
waitMinutes | integer | Max minutes to wait for deploy to complete |
sf_check_deploy_status Check Deployment Status
Checks 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.
| Parameter | Type | Description |
|---|---|---|
deployId * | string | Deploy async job ID returned from sf_deploy_metadata |
sf_retrieve_metadata Retrieve Metadata
Retrieves 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.
| Parameter | Type | Description |
|---|---|---|
componentName | string | Single component name (used with metadataType) |
components | array | Metadata components to retrieve |
metadataType | string | Single metadata type (alternative to components array) |
packageXml | string | Raw package.xml content for selective retrieve. If provided, components list is ignored. |
sf_delete_metadata Delete Metadata
Permanently 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…
| Parameter | Type | Description |
|---|---|---|
fullNames * | array | 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 li… |
metadataType * | string | Metadata type to delete, e.g. 'CustomObject', 'CustomField', 'Flow', 'GenAiFunction', 'GenAiPlugin', 'GenAiPlannerBundle', 'Bot' |
sf_query_records Query Records (SOQL)
Executes 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"). Row cap: 'limit' defaults to 200 and is a ceiling, not a hint. If the SOQL carries its own LIMIT the smaller of the two…
| Parameter | Type | Description |
|---|---|---|
query * | string | Full SOQL query string, e.g. 'SELECT Id, Name FROM Account WHERE Industry = \'Technology\' LIMIT 10' |
limit | integer | Maximum records to return (default 200). Acts as a ceiling: if the SOQL contains its own LIMIT, the smaller of the two wins, so a LIMIT in the query can tighten this but never raise it. The response r… |
sf_describe_object Describe Object Schema
Retrieves 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'…
| Parameter | Type | Description |
|---|---|---|
objectApiName * | string | SObject API name to describe, e.g. 'Account', 'My_Object__c' |
fieldsOnly | boolean | 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… |
timeoutSeconds | integer | Max time to poll when waitForFields is set. Ignored otherwise. |
waitForFields | array | 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… |
sf_list_objects List / Search Objects
Finds 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)…
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum objects to return |
objectType | string | Restrict to custom or standard objects |
queryableOnly | boolean | Only return objects that support SOQL queries |
searchTerm | string | Partial API name or label to match, case-insensitive. Omit to list everything. Results rank exact matches first, then prefix, then substring. |
sf_get_metadata_dependencies Metadata Impact Analysis
Answers "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…
| Parameter | Type | Description |
|---|---|---|
componentId | string | Salesforce Id of the component, as an alternative to type+name (required for types not in the supported list). |
componentName | string | Component API name. For CustomField use 'Object.Field__c', e.g. 'Account.Revenue__c'. |
componentType | string | Metadata type: CustomField, CustomObject, ApexClass, ApexTrigger, Flow, ValidationRule, Layout, PermissionSet, LightningComponentBundle, AuraDefinitionBundle, StaticResource, ApexPage, ApexComponent |
includeUses | boolean | Also return what this component itself depends on (the reverse direction). |
sf_list_toolsets List Toolsets
Lists 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.
sf_load_toolset Load Toolset
Loads 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.
| Parameter | Type | Description |
|---|---|---|
toolsets * | array | 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,… |
sf_find_tool Find Tool
Searches 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".
| Parameter | Type | Description |
|---|---|---|
query * | string | What you are looking for, e.g. "validation rule" or "create flow". |
autoLoad | boolean | Load the toolsets containing the matches so they become callable straight away. Default true. |
sf_tool_schema Get Tool Schema
Returns the input schema, title and description of any of this server's 228 tools, whether or not its toolset is loaded. Use this to find out what arguments a tool takes when it is not in your tool list, then invoke it with sf_call_tool.
| Parameter | Type | Description |
|---|---|---|
tool * | string | Exact tool name, e.g. "sf_execute_anonymous_apex". |
sf_call_tool Call Tool
Invokes any of this server's 228 tools by name, including tools whose toolset is not loaded and tools that do not appear in your tool list. Use this whenever a Salesforce tool you need is not directly callable — it works even on clients that do not refresh their tool list after sf_load_toolset. Get the argument shape first with sf_tool_schema or sf_find_tool. Arguments are validated and permission-checked exactly as they are on a direct call.
| Parameter | Type | Description |
|---|---|---|
tool * | string | Exact tool name, e.g. "sf_execute_anonymous_apex". |
arguments | object | Arguments object for that tool, matching its inputSchema. Omit for a tool that takes none. |