salesforce-metadata-mcp 2.1.4 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CreateAgentSchema, CreateAgentTopicSchema, CreateAgentActionSchema, CreateAgentPlannerSchema,
3
- GetAgentSchema, UpdateAgentTopicSchema, UpdateAgentActionSchema, DeleteAgentSchema,
3
+ ActivateAgentSchema, DeactivateAgentSchema, GetAgentSchema, UpdateAgentTopicSchema, UpdateAgentActionSchema, DeleteAgentSchema,
4
4
  ListAgentsSchema, TestAgentSchema, GetAgentLogsSchema,
5
5
  } from "../schemas/index.js";
6
6
  import {
@@ -115,7 +115,7 @@ For Knowledge-grounded agents, set dataLibraryName to the API name of a Data Lib
115
115
  server.registerTool("sf_activate_agent", {
116
116
  title: "Activate Agentforce Agent",
117
117
  description: `Activates an Agentforce Agent so it is available to users. After making configuration changes (adding/removing topics or actions), re-activate with this tool.`,
118
- inputSchema: { type: "object", properties: { agentApiName: { type: "string", description: "API name of the agent to activate, e.g. 'CRM_Record_Creator'" } }, required: ["agentApiName"] },
118
+ inputSchema: ActivateAgentSchema,
119
119
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
120
120
  }, async (params) => {
121
121
  const auth = await getAuth();
@@ -126,7 +126,7 @@ For Knowledge-grounded agents, set dataLibraryName to the API name of a Data Lib
126
126
  server.registerTool("sf_deactivate_agent", {
127
127
  title: "Deactivate Agentforce Agent",
128
128
  description: `Deactivates an Agentforce Agent so configuration changes can be made. You must deactivate an agent before modifying its topics, actions, or planner configuration. After making changes, re-activate with sf_activate_agent.`,
129
- inputSchema: { type: "object", properties: { agentApiName: { type: "string", description: "API name of the agent to deactivate, e.g. 'CRM_Record_Creator'" } }, required: ["agentApiName"] },
129
+ inputSchema: DeactivateAgentSchema,
130
130
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
131
131
  }, async (params) => {
132
132
  const auth = await getAuth();
@@ -1,6 +1,6 @@
1
- import { CreateApexClassSchema, CreateApexTriggerSchema, CreateApexTestClassSchema, RunApexTestsSchema, ExecuteAnonymousApexSchema, } from "../schemas/index.js";
2
- import { getAuth } from "../services/salesforce.js";
3
- import { buildApexClassZip, buildApexTriggerZip, deployZip, pollDeployStatus, } from "../services/deployment.js";
1
+ import { CreateApexClassSchema, CreateApexTriggerSchema, CreateApexTestClassSchema, RunApexTestsSchema, ExecuteAnonymousApexSchema, UpdateApexClassSchema, GetApexClassSchema, GetCodeCoverageSchema, CreateVisualforcePageSchema, CreateAuraComponentSchema, } from "../schemas/index.js";
2
+ import { getAuth, getApexClass, getCodeCoverage, API_VERSION } from "../services/salesforce.js";
3
+ import { buildApexClassZip, buildApexTriggerZip, buildVFPageZip, buildAuraZip, deployZip, pollDeployStatus, } from "../services/deployment.js";
4
4
  import { executeAnonymousApex, runApexTests, } from "../services/tooling.js";
5
5
  import { resultContent } from "./utils.js";
6
6
  export function registerApexTools(server) {
@@ -91,5 +91,73 @@ export function registerApexTools(server) {
91
91
  const result = await executeAnonymousApex(auth, params.apexCode);
92
92
  return resultContent(result);
93
93
  });
94
+ server.registerTool("sf_update_apex_class", {
95
+ title: "Update Apex Class",
96
+ description: `Updates an existing Apex class by redeploying it with new source code. The class body is fully replaced — provide the complete class source. The deploy uses zip-based Metadata API for immediate deployment.`,
97
+ inputSchema: UpdateApexClassSchema,
98
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
99
+ }, async (params) => {
100
+ const auth = await getAuth();
101
+ try {
102
+ const base64Zip = await buildApexClassZip(params.className, params.classBody, API_VERSION);
103
+ const deployId = await deployZip(auth, base64Zip);
104
+ const result = await pollDeployStatus(auth, deployId, 120_000);
105
+ return resultContent(result);
106
+ } catch (err) {
107
+ return resultContent({ success: false, message: err instanceof Error ? err.message : String(err) });
108
+ }
109
+ });
110
+ server.registerTool("sf_get_apex_class", {
111
+ title: "Get Apex Class Source",
112
+ description: `Retrieves the source code and metadata of an Apex class from the org using the Tooling API. Returns the class body, API version, and status. Useful for reviewing existing code before making changes.`,
113
+ inputSchema: GetApexClassSchema,
114
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
115
+ }, async (params) => {
116
+ const auth = await getAuth();
117
+ const result = await getApexClass(auth, params);
118
+ return resultContent(result);
119
+ });
120
+ server.registerTool("sf_get_code_coverage", {
121
+ title: "Get Apex Code Coverage",
122
+ description: `Retrieves Apex code coverage percentages from the last test run using the Tooling API. Returns covered lines, uncovered lines, and coverage percentage per class. Filter by class name or retrieve all classes.`,
123
+ inputSchema: GetCodeCoverageSchema,
124
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
125
+ }, async (params) => {
126
+ const auth = await getAuth();
127
+ const result = await getCodeCoverage(auth, params);
128
+ return resultContent(result);
129
+ });
130
+ server.registerTool("sf_create_visualforce_page", {
131
+ title: "Create Visualforce Page",
132
+ description: `Deploys a Visualforce page to the org using zip-based Metadata API. Provide the page name (no spaces) and the full Visualforce markup. Visualforce pages use the apex: and c: tag libraries and can reference Apex controllers.`,
133
+ inputSchema: CreateVisualforcePageSchema,
134
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
135
+ }, async (params) => {
136
+ const auth = await getAuth();
137
+ try {
138
+ const base64Zip = await buildVFPageZip(params.pageName, params.markup, API_VERSION);
139
+ const deployId = await deployZip(auth, base64Zip);
140
+ const result = await pollDeployStatus(auth, deployId, 120_000);
141
+ return resultContent(result);
142
+ } catch (err) {
143
+ return resultContent({ success: false, message: err instanceof Error ? err.message : String(err) });
144
+ }
145
+ });
146
+ server.registerTool("sf_create_aura_component", {
147
+ title: "Create Aura Component Bundle",
148
+ description: `Deploys an Aura (Lightning) component bundle using zip-based Metadata API. Provide the component name and markup (.cmp file). Optionally include a controller, helper, and CSS style. Aura components are the predecessor to LWC and still supported for complex use cases.`,
149
+ inputSchema: CreateAuraComponentSchema,
150
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
151
+ }, async (params) => {
152
+ const auth = await getAuth();
153
+ try {
154
+ const base64Zip = await buildAuraZip(params.componentName, params.markup, params.controller, params.helper, params.style, API_VERSION);
155
+ const deployId = await deployZip(auth, base64Zip);
156
+ const result = await pollDeployStatus(auth, deployId, 120_000);
157
+ return resultContent(result);
158
+ } catch (err) {
159
+ return resultContent({ success: false, message: err instanceof Error ? err.message : String(err) });
160
+ }
161
+ });
94
162
  }
95
163
  //# sourceMappingURL=apex.js.map
@@ -1,5 +1,5 @@
1
- import { CreateEmailAlertSchema, CreatePlatformEventSchema, CreateAssignmentRuleSchema, CreateEscalationRuleSchema, CreateAutoResponseRuleSchema, CreateMatchingRuleSchema, CreateDuplicateRuleSchema, CreateApexEmailServiceSchema, CreateScheduledJobSchema, } from "../schemas/index.js";
2
- import { getAuth, createEmailAlert, createPlatformEvent, createAssignmentRule, createAutoResponseRule, createMatchingRule, createDuplicateRule, } from "../services/salesforce.js";
1
+ import { CreateEmailAlertSchema, CreatePlatformEventSchema, CreateAssignmentRuleSchema, CreateEscalationRuleSchema, CreateAutoResponseRuleSchema, CreateMatchingRuleSchema, CreateDuplicateRuleSchema, CreateApexEmailServiceSchema, CreateScheduledJobSchema, ActivateFlowSchema, CreateQuickActionSchema, } from "../schemas/index.js";
2
+ import { getAuth, createEmailAlert, createPlatformEvent, createAssignmentRule, createAutoResponseRule, createMatchingRule, createDuplicateRule, activateFlow, createQuickAction, } from "../services/salesforce.js";
3
3
  import { createApexEmailService, createScheduledJob, } from "../services/tooling.js";
4
4
  import { resultContent } from "./utils.js";
5
5
  export function registerAutomationTools(server) {
@@ -182,5 +182,28 @@ export function registerAutomationTools(server) {
182
182
  const result = await createScheduledJob(auth, params.className, params.jobName, params.cronExpression);
183
183
  return resultContent(result);
184
184
  });
185
+ server.registerTool("sf_activate_flow", {
186
+ title: "Activate a Flow",
187
+ description: `Activates the latest version of a Flow via the Tooling API. Flow must already exist in the org. The flow's latest version will be set as the active version. Use after creating or updating a flow to make it available.`,
188
+ inputSchema: ActivateFlowSchema,
189
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
190
+ }, async (params) => {
191
+ const auth = await getAuth();
192
+ const result = await activateFlow(auth, params);
193
+ return resultContent(result);
194
+ });
195
+ server.registerTool("sf_create_quick_action", {
196
+ title: "Create Quick Action",
197
+ description: `Creates a Quick Action (global or object-specific) for record creation, updates, logging calls, sending emails, or launching flows from record pages and the global action bar.
198
+
199
+ Action types: Create, Update, LogACall, SendEmail, Flow, Visualforce.
200
+ For object-specific actions, provide objectApiName. For global actions, omit it.`,
201
+ inputSchema: CreateQuickActionSchema,
202
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
203
+ }, async (params) => {
204
+ const auth = await getAuth();
205
+ const result = await createQuickAction(auth, params);
206
+ return resultContent(result);
207
+ });
185
208
  }
186
209
  //# sourceMappingURL=automation.js.map
@@ -0,0 +1,86 @@
1
+ import { CreateUserSchema, UpdateUserSchema, AssignQueueMemberSchema, CreatePublicGroupSchema, QueryRecordsSchema, CreateRecordSchema, UpdateRecordSchema, BulkImportRecordsSchema, } from "../schemas/index.js";
2
+ import { getAuth, createUser, updateUser, assignQueueMember, createPublicGroup, queryRecords, createRecord, updateRecord, bulkImportRecords, } from "../services/salesforce.js";
3
+ import { resultContent } from "./utils.js";
4
+ export function registerDataTools(server) {
5
+ server.registerTool("sf_create_user", {
6
+ title: "Create Salesforce User",
7
+ description: `Creates a new Salesforce user via the REST API. Requires username (must be unique and email-like), lastName, email, and profileName. The profile must already exist. Optionally assign a role by roleApiName (DeveloperName of the UserRole). The user will receive a welcome email unless email confirmations are suppressed in org settings.`,
8
+ inputSchema: CreateUserSchema,
9
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
10
+ }, async (params) => {
11
+ const auth = await getAuth();
12
+ const result = await createUser(auth, params);
13
+ return resultContent(result);
14
+ });
15
+ server.registerTool("sf_update_user", {
16
+ title: "Update Salesforce User",
17
+ description: `Updates an existing Salesforce user's properties via the REST API. Look up the user by username and update fields like firstName, lastName, email, title, department, phone, or isActive (to deactivate/reactivate). Only fields you provide are updated.`,
18
+ inputSchema: UpdateUserSchema,
19
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
20
+ }, async (params) => {
21
+ const auth = await getAuth();
22
+ const result = await updateUser(auth, params);
23
+ return resultContent(result);
24
+ });
25
+ server.registerTool("sf_assign_queue_member", {
26
+ title: "Add User to Queue",
27
+ description: `Adds a user to an existing Queue (GroupMember SObject) by username and queue DeveloperName. The queue must already exist (create via sf_create_queue). Users in queues can be assigned records and receive queue notification emails.`,
28
+ inputSchema: AssignQueueMemberSchema,
29
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
30
+ }, async (params) => {
31
+ const auth = await getAuth();
32
+ const result = await assignQueueMember(auth, params);
33
+ return resultContent(result);
34
+ });
35
+ server.registerTool("sf_create_public_group", {
36
+ title: "Create Public Group",
37
+ description: `Creates a Public Group (Group SObject with Type=Regular) for sharing rules, email distribution, or queue membership. Public groups can include users, roles, and other groups. Use as a sharing target in sf_create_sharing_rule.`,
38
+ inputSchema: CreatePublicGroupSchema,
39
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
40
+ }, async (params) => {
41
+ const auth = await getAuth();
42
+ const result = await createPublicGroup(auth, params);
43
+ return resultContent(result);
44
+ });
45
+ server.registerTool("sf_query_records", {
46
+ title: "Query Records (SOQL)",
47
+ description: `Executes a SOQL query against the org and returns matching records. Provide either a full SOQL string (soql param) or individual parameters (objectApiName, fields, whereClause, orderBy, limit). Use for reading data, checking existing records before creating, or verifying changes.`,
48
+ inputSchema: QueryRecordsSchema,
49
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
50
+ }, async (params) => {
51
+ const auth = await getAuth();
52
+ const result = await queryRecords(auth, params);
53
+ return resultContent(result);
54
+ });
55
+ server.registerTool("sf_create_record", {
56
+ title: "Create SObject Record",
57
+ description: `Creates a single SObject record via the Salesforce REST API. Provide the object API name and a fields object with field API names and values. For bulk creation (100+ records), use sf_bulk_import_records instead.`,
58
+ inputSchema: CreateRecordSchema,
59
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
60
+ }, async (params) => {
61
+ const auth = await getAuth();
62
+ const result = await createRecord(auth, params);
63
+ return resultContent(result);
64
+ });
65
+ server.registerTool("sf_update_record", {
66
+ title: "Update SObject Record",
67
+ description: `Updates an existing SObject record by record ID via the Salesforce REST API. Provide the object API name, the 15 or 18 character record ID, and the fields to update. Only provided fields are changed — omitted fields retain their current values.`,
68
+ inputSchema: UpdateRecordSchema,
69
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
70
+ }, async (params) => {
71
+ const auth = await getAuth();
72
+ const result = await updateRecord(auth, params);
73
+ return resultContent(result);
74
+ });
75
+ server.registerTool("sf_bulk_import_records", {
76
+ title: "Bulk Import Records (Bulk API 2.0)",
77
+ description: `Bulk imports records using the Salesforce Bulk API 2.0. Supports insert, upsert, update, and delete operations on large datasets (thousands to millions of records). Provide CSV data with a header row. For upsert, set externalIdField to the field used for matching. Polls until the job completes and returns success/failure counts.`,
78
+ inputSchema: BulkImportRecordsSchema,
79
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
80
+ }, async (params) => {
81
+ const auth = await getAuth();
82
+ const result = await bulkImportRecords(auth, params);
83
+ return resultContent(result);
84
+ });
85
+ }
86
+ //# sourceMappingURL=data.js.map
@@ -1,5 +1,5 @@
1
- import { CreateOutboundChangeSetSchema, AddToChangeSetSchema, DeployMetadataSchema, CheckDeployStatusSchema, RetrieveMetadataSchema, } from "../schemas/index.js";
2
- import { getAuth } from "../services/salesforce.js";
1
+ import { CreateOutboundChangeSetSchema, AddToChangeSetSchema, DeployMetadataSchema, CheckDeployStatusSchema, RetrieveMetadataSchema, ValidateDeploymentSchema, ListMetadataSchema, } from "../schemas/index.js";
2
+ import { getAuth, listMetadataForTool } from "../services/salesforce.js";
3
3
  import { buildGenericDeployZip, deployZip, pollDeployStatus, checkDeployStatus, retrieveMetadata, } from "../services/deployment.js";
4
4
  import { createOutboundChangeSet, addComponentsToChangeSet, } from "../services/tooling.js";
5
5
  import { resultContent } from "./utils.js";
@@ -33,17 +33,18 @@ export function registerDeploymentTools(server) {
33
33
  });
34
34
  server.registerTool("sf_deploy_metadata", {
35
35
  title: "Deploy Metadata",
36
- description: `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.`,
36
+ description: `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). Set testLevel to RunSpecifiedTests, RunLocalTests, or RunAllTestsInOrg. Polls until complete or timeout.`,
37
37
  inputSchema: DeployMetadataSchema,
38
38
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
39
39
  }, async (params) => {
40
40
  const auth = await getAuth();
41
41
  try {
42
- const base64Zip = await buildGenericDeployZip(params.components, "62.0");
42
+ const base64Zip = await buildGenericDeployZip(params.components, "66.0");
43
43
  const deployId = await deployZip(auth, base64Zip, {
44
44
  checkOnly: params.checkOnly,
45
45
  runTests: params.runTests,
46
46
  rollbackOnError: params.rollbackOnError,
47
+ testLevel: params.testLevel,
47
48
  });
48
49
  const result = await pollDeployStatus(auth, deployId, params.waitMinutes * 60 * 1000);
49
50
  return resultContent({
@@ -85,5 +86,40 @@ export function registerDeploymentTools(server) {
85
86
  const result = await retrieveMetadata(auth, params.components);
86
87
  return resultContent(result);
87
88
  });
89
+ server.registerTool("sf_validate_deployment", {
90
+ title: "Validate Deployment (Check-Only)",
91
+ description: `Runs a check-only deployment that validates metadata components against the org without making any changes. Equivalent to sf_deploy_metadata with checkOnly:true. Use before deploying to production to catch errors and test failures without risk. Specify testLevel to control which tests run during validation.`,
92
+ inputSchema: ValidateDeploymentSchema,
93
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
94
+ }, async (params) => {
95
+ const auth = await getAuth();
96
+ try {
97
+ const base64Zip = await buildGenericDeployZip(params.components, "66.0");
98
+ const deployId = await deployZip(auth, base64Zip, {
99
+ checkOnly: true,
100
+ runTests: params.runTests,
101
+ rollbackOnError: true,
102
+ testLevel: params.testLevel,
103
+ });
104
+ const result = await pollDeployStatus(auth, deployId, (params.waitMinutes ?? 10) * 60 * 1000);
105
+ return resultContent({
106
+ success: result.success,
107
+ message: `[VALIDATE ONLY] ${result.message}`,
108
+ ...(result.success ? { fullName: deployId, created: false } : {})
109
+ });
110
+ } catch (err) {
111
+ return resultContent({ success: false, message: err instanceof Error ? err.message : String(err) });
112
+ }
113
+ });
114
+ server.registerTool("sf_list_metadata", {
115
+ title: "List Metadata Components",
116
+ description: `Lists all metadata components of a given type in the org (e.g., ApexClass, CustomObject, Flow, PermissionSet). Returns full names, file names, and last modified dates. Useful for discovering what metadata exists in the org before retrieving or deploying.`,
117
+ inputSchema: ListMetadataSchema,
118
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
119
+ }, async (params) => {
120
+ const auth = await getAuth();
121
+ const result = await listMetadataForTool(auth, params.metadataType);
122
+ return resultContent(result);
123
+ });
88
124
  }
89
125
  //# sourceMappingURL=deployment.js.map
@@ -1,5 +1,5 @@
1
- import { CreateExperienceSiteSchema, CreateExperiencePageSchema } from "../schemas/index.js";
2
- import { getAuth, createExperienceSite } from "../services/salesforce.js";
1
+ import { CreateExperienceSiteSchema, CreateExperiencePageSchema, PublishExperienceSiteSchema, UpdateExperienceSiteSchema, CreateNavigationMenuSchema, CreateExperienceSiteMemberSchema, SetExperienceSiteBrandingSchema, } from "../schemas/index.js";
2
+ import { getAuth, createExperienceSite, publishExperienceSite, updateExperienceSite, createNavigationMenu, createExperienceSiteMember, setExperienceSiteBranding, } from "../services/salesforce.js";
3
3
  import { resultContent } from "./utils.js";
4
4
  export function registerExperienceTools(server) {
5
5
  server.registerTool("sf_create_experience_site", {
@@ -49,5 +49,55 @@ export function registerExperienceTools(server) {
49
49
  return resultContent({ success: false, message: err instanceof Error ? err.message : String(err) });
50
50
  }
51
51
  });
52
+ server.registerTool("sf_publish_experience_site", {
53
+ title: "Publish Experience Cloud Site",
54
+ description: `Publishes an Experience Cloud site to make all pending changes (pages, branding, navigation) live. Calls the Salesforce Connect API publish endpoint. The site must be created and in Active or UnderConstruction status. Publishing typically takes 1-5 minutes.`,
55
+ inputSchema: PublishExperienceSiteSchema,
56
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
57
+ }, async (params) => {
58
+ const auth = await getAuth();
59
+ const result = await publishExperienceSite(auth, params);
60
+ return resultContent(result);
61
+ });
62
+ server.registerTool("sf_update_experience_site", {
63
+ title: "Update Experience Cloud Site Settings",
64
+ description: `Updates settings on an existing Experience Cloud site (Network metadata) such as description, guest user access, and guest profile. Use after creating a site to configure access control.`,
65
+ inputSchema: UpdateExperienceSiteSchema,
66
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
67
+ }, async (params) => {
68
+ const auth = await getAuth();
69
+ const result = await updateExperienceSite(auth, params);
70
+ return resultContent(result);
71
+ });
72
+ server.registerTool("sf_create_navigation_menu", {
73
+ title: "Create Experience Site Navigation Menu",
74
+ description: `Creates a Navigation Menu for an Experience Cloud site. Navigation menus appear in the site header and sidebar. Items can link to internal Salesforce pages, external URLs, or object lists.`,
75
+ inputSchema: CreateNavigationMenuSchema,
76
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
77
+ }, async (params) => {
78
+ const auth = await getAuth();
79
+ const result = await createNavigationMenu(auth, params);
80
+ return resultContent(result);
81
+ });
82
+ server.registerTool("sf_add_experience_site_members", {
83
+ title: "Add Member Profiles to Experience Site",
84
+ description: `Adds user profiles and/or permission sets as member groups to an Experience Cloud site, allowing users with those profiles to log in and access the community. Updates the Network metadata's networkMemberGroups.`,
85
+ inputSchema: CreateExperienceSiteMemberSchema,
86
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
87
+ }, async (params) => {
88
+ const auth = await getAuth();
89
+ const result = await createExperienceSiteMember(auth, params);
90
+ return resultContent(result);
91
+ });
92
+ server.registerTool("sf_set_experience_site_branding", {
93
+ title: "Set Experience Site Branding",
94
+ description: `Applies branding properties to an Experience Cloud site using a BrandingSet. Set colors, fonts, logo URLs, and other visual properties. Properties use Salesforce branding token names (e.g., brandingDesignTokenPrimaryColor, brandingDesignTokenFontFamilySans).`,
95
+ inputSchema: SetExperienceSiteBrandingSchema,
96
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
97
+ }, async (params) => {
98
+ const auth = await getAuth();
99
+ const result = await setExperienceSiteBranding(auth, params);
100
+ return resultContent(result);
101
+ });
52
102
  }
53
103
  //# sourceMappingURL=experience.js.map
@@ -10,6 +10,10 @@ import { registerAgentforceTools } from "./agentforce.js";
10
10
  import { registerDeploymentTools } from "./deployment.js";
11
11
  import { registerMcpTools } from "./mcp.js";
12
12
  import { registerIntegrationTools } from "./integrations.js";
13
+ import { registerReportTools } from "./reports.js";
14
+ import { registerDataTools } from "./data.js";
15
+ import { registerOmniStudioTools } from "./omnistudio.js";
16
+ import { registerOmniChannelTools } from "./omnichannel.js";
13
17
  export function registerTools(server) {
14
18
  registerMetadataTools(server);
15
19
  registerObjectTools(server);
@@ -23,5 +27,9 @@ export function registerTools(server) {
23
27
  registerDeploymentTools(server);
24
28
  registerMcpTools(server);
25
29
  registerIntegrationTools(server);
30
+ registerReportTools(server);
31
+ registerDataTools(server);
32
+ registerOmniStudioTools(server);
33
+ registerOmniChannelTools(server);
26
34
  }
27
35
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import { CreateConnectedAppSchema, CreateExternalDataSourceSchema, CreateExternalObjectSchema, CreateRemoteSiteSettingSchema, CreateCspSettingSchema, } from "../schemas/index.js";
2
- import { getAuth, createConnectedApp, createExternalDataSource, createExternalObject, createRemoteSiteSetting, createCspSetting, } from "../services/salesforce.js";
1
+ import { CreateConnectedAppSchema, CreateExternalDataSourceSchema, CreateExternalObjectSchema, CreateRemoteSiteSettingSchema, CreateCspSettingSchema, CreateOutboundMessageSchema, CreateAuthProviderSchema, } from "../schemas/index.js";
2
+ import { getAuth, createConnectedApp, createExternalDataSource, createExternalObject, createRemoteSiteSetting, createCspSetting, createOutboundMessage, createAuthProvider, } from "../services/salesforce.js";
3
3
  import { resultContent } from "./utils.js";
4
4
  export function registerIntegrationTools(server) {
5
5
  server.registerTool("sf_create_connected_app", {
@@ -92,5 +92,25 @@ export function registerIntegrationTools(server) {
92
92
  });
93
93
  return resultContent(result);
94
94
  });
95
+ server.registerTool("sf_create_outbound_message", {
96
+ title: "Create Outbound Message",
97
+ description: `Creates a Workflow Outbound Message that sends XML data to an external SOAP endpoint when triggered by a Workflow Rule. Use to integrate Salesforce with external systems that listen for HTTP POST notifications.`,
98
+ inputSchema: CreateOutboundMessageSchema,
99
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
100
+ }, async (params) => {
101
+ const auth = await getAuth();
102
+ const result = await createOutboundMessage(auth, params);
103
+ return resultContent(result);
104
+ });
105
+ server.registerTool("sf_create_auth_provider", {
106
+ title: "Create Auth Provider",
107
+ description: `Creates an Auth Provider (OAuth 2.0 SSO configuration) for third-party identity providers. Supports standard providers (Facebook, Google, Salesforce) and custom OAuth 2.0 flows. Used for Social Sign-On and Named Credential OAuth flows.`,
108
+ inputSchema: CreateAuthProviderSchema,
109
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
110
+ }, async (params) => {
111
+ const auth = await getAuth();
112
+ const result = await createAuthProvider(auth, params);
113
+ return resultContent(result);
114
+ });
95
115
  }
96
116
  //# sourceMappingURL=integrations.js.map
@@ -1,5 +1,5 @@
1
- import { CreateCustomMetadataTypeSchema, CreateCustomMetadataRecordSchema, CreateCustomLabelSchema, CreateCustomSettingSchema, CreateGlobalValueSetSchema, CreateRecordTypeSchema, CreateBusinessProcessSchema, CreatePageLayoutSchema, CreateSharingRuleSchema, CreateFieldDependencySchema, } from "../schemas/index.js";
2
- import { getAuth, createCustomMetadataType, createCustomMetadataRecord, createCustomLabel, createCustomSetting, createGlobalValueSet, createRecordType, createBusinessProcess, createPageLayout, createSharingRule, createFieldDependency, } from "../services/salesforce.js";
1
+ import { CreateCustomMetadataTypeSchema, CreateCustomMetadataRecordSchema, CreateCustomLabelSchema, CreateCustomSettingSchema, CreateGlobalValueSetSchema, CreateRecordTypeSchema, CreateBusinessProcessSchema, CreatePageLayoutSchema, CreateSharingRuleSchema, CreateFieldDependencySchema, UpdateCustomObjectSchema, UpdateCustomFieldSchema, CreateRelationshipFieldSchema, CreateFormulaFieldSchema, } from "../schemas/index.js";
2
+ import { getAuth, createCustomMetadataType, createCustomMetadataRecord, createCustomLabel, createCustomSetting, createGlobalValueSet, createRecordType, createBusinessProcess, createPageLayout, createSharingRule, createFieldDependency, updateCustomObject, updateCustomField, createRelationshipField, createFormulaField, } from "../services/salesforce.js";
3
3
  import { resultContent } from "./utils.js";
4
4
  export function registerObjectTools(server) {
5
5
  server.registerTool("sf_create_custom_metadata_type", {
@@ -168,5 +168,45 @@ export function registerObjectTools(server) {
168
168
  });
169
169
  return resultContent(result);
170
170
  });
171
+ server.registerTool("sf_update_custom_object", {
172
+ title: "Update Custom Object",
173
+ description: `Updates properties of an existing custom object such as label, plural label, description, or feature toggles (history tracking, reports, search, activities). Only provide the fields you want to change.`,
174
+ inputSchema: UpdateCustomObjectSchema,
175
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
176
+ }, async (params) => {
177
+ const auth = await getAuth();
178
+ const result = await updateCustomObject(auth, params);
179
+ return resultContent(result);
180
+ });
181
+ server.registerTool("sf_update_custom_field", {
182
+ title: "Update Custom Field",
183
+ description: `Updates properties of an existing custom field such as label, description, help text, required, unique, or default value. Provide objectApiName (e.g. 'Account') and fieldApiName (e.g. 'Annual_Revenue__c').`,
184
+ inputSchema: UpdateCustomFieldSchema,
185
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
186
+ }, async (params) => {
187
+ const auth = await getAuth();
188
+ const result = await updateCustomField(auth, params);
189
+ return resultContent(result);
190
+ });
191
+ server.registerTool("sf_create_relationship_field", {
192
+ title: "Create Relationship Field (Lookup / Master-Detail)",
193
+ description: `Creates a Lookup or Master-Detail relationship field on a custom object. Lookup fields are optional references; Master-Detail creates a parent-child relationship where the child cannot exist without the parent.`,
194
+ inputSchema: CreateRelationshipFieldSchema,
195
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
196
+ }, async (params) => {
197
+ const auth = await getAuth();
198
+ const result = await createRelationshipField(auth, params);
199
+ return resultContent(result);
200
+ });
201
+ server.registerTool("sf_create_formula_field", {
202
+ title: "Create Formula Field",
203
+ description: `Creates a formula field on a custom or standard object. Formula fields are read-only and calculated dynamically based on the formula expression. Supports Text, Number, Currency, Date, DateTime, Checkbox, and Percent return types.`,
204
+ inputSchema: CreateFormulaFieldSchema,
205
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
206
+ }, async (params) => {
207
+ const auth = await getAuth();
208
+ const result = await createFormulaField(auth, params);
209
+ return resultContent(result);
210
+ });
171
211
  }
172
212
  //# sourceMappingURL=objects.js.map