salesforce-metadata-mcp

v3.2.1
io.github.semwalajay83-sem/salesforce-metadata-mcp Checked 8 hours ago Published 11 days ago

The 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.

ParameterTypeDescription
fullName *stringAPI name of the custom object, e.g. 'Invoice__c'
label *stringSingular label shown in the UI, e.g. 'Invoice'
pluralLabel *stringPlural label, e.g. 'Invoices'
autoNumberFormatstringFormat for AutoNumber name field, e.g. 'INV-{0000}'. Required when nameFieldType is AutoNumber.
deploymentStatusstringDeployment status of the object
descriptionstringOptional description for the object
enableActivitiesbooleanAllow activities (tasks/events) on this object
enableHistorybooleanEnable field history tracking
enableReportsbooleanMake the object available for reports
enableSearchbooleanEnable search on this object
nameFieldLabelstringLabel for the standard Name field, e.g. 'Invoice Name'
nameFieldTypestringType of Name field: 'Text' (free-form) or 'AutoNumber' (auto-increment)
sharingModelstringOWD 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.

ParameterTypeDescription
fieldName *stringAPI name of the field, e.g. 'Status__c'
label *stringDisplay label for the field, e.g. 'Status'
objectName *stringAPI name of the parent object, e.g. 'Account' or 'Invoice__c'
type *stringSalesforce field type
defaultValueboolean | stringDefault value for the field. Use true/false for Checkbox fields.
deleteConstraintstringDelete behaviour for Lookup fields: 'Cascade', 'Restrict', or 'SetNull'
descriptionstringOptional description for the field
externalIdbooleanWhether this field is an external ID
lengthintegerMax length. Text/TextArea: 1–255 (default 255). LongTextArea/Html (Text Area Long / Rich Text Area): 256–131072 (default 32768).
picklistValuesPicklist values. Either a plain list (['Draft','Open']) or the full { restricted, sorted, values } object. Required for Picklist / MultiselectPicklist types.
precisionintegerTotal digits for Number/Currency/Percent (1–18)
referenceTostringTarget object API name for Lookup/MasterDetail, e.g. 'Account'
relationshipLabelstringLabel for the relationship on the related object
relationshipNamestringAPI name for the relationship (no spaces)
requiredbooleanWhether the field is required on page layouts
scaleintegerDecimal places for Number/Currency/Percent (0–17)
uniquebooleanWhether values must be unique (Text, Number, Email)
visibleLinesintegerVisible 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.

ParameterTypeDescription
objectFieldFullName *stringFull API name of the picklist field, e.g. 'Invoice__c.Status__c'
values *arrayNew 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.

ParameterTypeDescription
allowedSubmitters *arrayWho can submit: [{type:'owner'}] or [{type:'role', submitter:'SalesRep'}]
approvalSteps *arrayOrdered list of approval steps
label *stringHuman-readable label, e.g. 'Large Deal Approval Process'
objectName *stringObject API name, e.g. 'Opportunity' or 'Leave_Request__c'
processName *stringAPI name of the process, e.g. 'Large_Deal_Approval'
activebooleanActivate immediately (warning: cannot change steps after activation)
allowRecallbooleanAllow submitters to recall approval requests
descriptionstringDescription of the approval process
emailTemplatestringEmail template for approval notifications, e.g. 'unfiled$public/ApprovalEmail'
entryFilterCriteriaarrayFilter criteria alternative to entryFormula
entryFormulastringFormula records must satisfy to enter this process
finalApprovalLockbooleanLock record after final approval
finalRejectionLockbooleanLock record after final rejection
recordEditabilitystringWho 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.

ParameterTypeDescription
errorConditionFormula *stringFormula returning TRUE when data is INVALID, e.g. "AND(ISPICKVAL(StageName,'Closed Won'),ISBLANK(CloseDate))"
errorMessage *stringError shown to user when validation fails (max 255 chars)
objectName *stringObject API name, e.g. 'Account', 'Opportunity', 'Invoice__c'
ruleName *stringAPI name for the rule, e.g. 'Require_Close_Date'
activebooleanWhether the rule is active
descriptionstringDescription of this validation rule
errorDisplayFieldstringField 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.

ParameterTypeDescription
actionName *stringAPI name of the action, e.g. 'Set_Stage_Closed_Won'
field *stringField API name to update, e.g. 'StageName'
label *stringHuman-readable label
objectName *stringObject API name, e.g. 'Opportunity'
formulastringFormula for the new value, e.g. 'TODAY()'
literalValuestringLiteral string/picklist value to set
notifyAssigneebooleanNotify owner/assignee after update
nullValuebooleanSet 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.

ParameterTypeDescription
fieldName *stringField name without __c suffix
formula *stringSalesforce 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 *stringField label
objectApiName *stringObject API name, e.g. 'Opportunity'
returnType *stringFormula return type
descriptionstringField description
formulaTreatBlanksAsstringHow to treat blank fields in the formula. Defaults to BlankAsZero for numeric types, BlankAsLogicalFalse for Checkbox.
precisionintegerTotal number of digits for Number/Currency/Percent return types (default 18)
scaleintegerDecimal 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.

ParameterTypeDescription
checkOnlybooleanValidate only, do not actually deploy
componentsarrayMetadata 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.
componentsXmlarrayOptional 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…
rollbackOnErrorbooleanRoll back all changes if any component fails
runTestsarrayTest classes to run during deployment
testLevelstringTest level: NoTestRun, RunSpecifiedTests, RunLocalTests, or RunAllTestsInOrg
waitMinutesintegerMax 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.

ParameterTypeDescription
deployId *stringDeploy 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.

ParameterTypeDescription
componentNamestringSingle component name (used with metadataType)
componentsarrayMetadata components to retrieve
metadataTypestringSingle metadata type (alternative to components array)
packageXmlstringRaw 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…

ParameterTypeDescription
fullNames *arrayFull 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 *stringMetadata 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…

ParameterTypeDescription
query *stringFull SOQL query string, e.g. 'SELECT Id, Name FROM Account WHERE Industry = \'Technology\' LIMIT 10'
limitintegerMaximum 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'…

ParameterTypeDescription
objectApiName *stringSObject API name to describe, e.g. 'Account', 'My_Object__c'
fieldsOnlybooleanIf 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…
timeoutSecondsintegerMax time to poll when waitForFields is set. Ignored otherwise.
waitForFieldsarrayField 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)…

ParameterTypeDescription
limitintegerMaximum objects to return
objectTypestringRestrict to custom or standard objects
queryableOnlybooleanOnly return objects that support SOQL queries
searchTermstringPartial 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…

ParameterTypeDescription
componentIdstringSalesforce Id of the component, as an alternative to type+name (required for types not in the supported list).
componentNamestringComponent API name. For CustomField use 'Object.Field__c', e.g. 'Account.Revenue__c'.
componentTypestringMetadata type: CustomField, CustomObject, ApexClass, ApexTrigger, Flow, ValidationRule, Layout, PermissionSet, LightningComponentBundle, AuraDefinitionBundle, StaticResource, ApexPage, ApexComponent
includeUsesbooleanAlso 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.

ParameterTypeDescription
toolsets *arrayToolset 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".

ParameterTypeDescription
query *stringWhat you are looking for, e.g. "validation rule" or "create flow".
autoLoadbooleanLoad 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.

ParameterTypeDescription
tool *stringExact 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.

ParameterTypeDescription
tool *stringExact tool name, e.g. "sf_execute_anonymous_apex".
argumentsobjectArguments object for that tool, matching its inputSchema. Omit for a tool that takes none.