salesforce-metadata-mcp 2.1.3 → 2.2.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.
- package/AGENTFORCE.md +125 -1
- package/CHANGELOG.md +125 -0
- package/README.md +106 -19
- package/dist/index.js +2 -2
- package/dist/schemas/index.js +424 -3
- package/dist/services/deployment.js +29 -3
- package/dist/services/salesforce.js +1127 -1
- package/dist/tools/agentforce.js +197 -38
- package/dist/tools/apex.js +71 -3
- package/dist/tools/automation.js +25 -2
- package/dist/tools/data.js +86 -0
- package/dist/tools/deployment.js +40 -4
- package/dist/tools/experience.js +52 -2
- package/dist/tools/index.js +4 -0
- package/dist/tools/integrations.js +22 -2
- package/dist/tools/objects.js +42 -2
- package/dist/tools/reports.js +46 -0
- package/dist/tools/security.js +82 -2
- package/dist/tools/ui.js +72 -2
- package/package.json +14 -3
package/dist/tools/experience.js
CHANGED
|
@@ -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
|
package/dist/tools/index.js
CHANGED
|
@@ -10,6 +10,8 @@ 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";
|
|
13
15
|
export function registerTools(server) {
|
|
14
16
|
registerMetadataTools(server);
|
|
15
17
|
registerObjectTools(server);
|
|
@@ -23,5 +25,7 @@ export function registerTools(server) {
|
|
|
23
25
|
registerDeploymentTools(server);
|
|
24
26
|
registerMcpTools(server);
|
|
25
27
|
registerIntegrationTools(server);
|
|
28
|
+
registerReportTools(server);
|
|
29
|
+
registerDataTools(server);
|
|
26
30
|
}
|
|
27
31
|
//# 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
|
package/dist/tools/objects.js
CHANGED
|
@@ -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
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CreateReportSchema, UpdateDashboardSchema, CreateReportFolderSchema, ShareReportFolderSchema, } from "../schemas/index.js";
|
|
2
|
+
import { getAuth, createReport, updateDashboard, createReportFolder, shareReportFolder, } from "../services/salesforce.js";
|
|
3
|
+
import { resultContent } from "./utils.js";
|
|
4
|
+
export function registerReportTools(server) {
|
|
5
|
+
server.registerTool("sf_create_report", {
|
|
6
|
+
title: "Create Salesforce Report",
|
|
7
|
+
description: `Creates a Salesforce Report using the Report metadata type. Supports Tabular, Summary, Matrix, and Joined formats. Specify the report type (e.g., Accounts, Opportunities), columns to display, and optional filters. Reports are created in the specified folder or your personal folder by default.`,
|
|
8
|
+
inputSchema: CreateReportSchema,
|
|
9
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
10
|
+
}, async (params) => {
|
|
11
|
+
const auth = await getAuth();
|
|
12
|
+
const result = await createReport(auth, params);
|
|
13
|
+
return resultContent(result);
|
|
14
|
+
});
|
|
15
|
+
server.registerTool("sf_update_dashboard", {
|
|
16
|
+
title: "Update Dashboard",
|
|
17
|
+
description: `Updates an existing Dashboard's title or description by reading the current configuration from the org and applying changes. The dashboard must already exist. For structural changes (adding/removing components), use sf_create_dashboard to create a new version.`,
|
|
18
|
+
inputSchema: UpdateDashboardSchema,
|
|
19
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
20
|
+
}, async (params) => {
|
|
21
|
+
const auth = await getAuth();
|
|
22
|
+
const result = await updateDashboard(auth, params);
|
|
23
|
+
return resultContent(result);
|
|
24
|
+
});
|
|
25
|
+
server.registerTool("sf_create_report_folder", {
|
|
26
|
+
title: "Create Report or Dashboard Folder",
|
|
27
|
+
description: `Creates a folder for organizing Reports or Dashboards. Folder access types: Hidden (only owner), Shared (explicit sharing), Public (all users). After creating, use sf_share_report_folder to grant access to specific users, roles, or groups.`,
|
|
28
|
+
inputSchema: CreateReportFolderSchema,
|
|
29
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
30
|
+
}, async (params) => {
|
|
31
|
+
const auth = await getAuth();
|
|
32
|
+
const result = await createReportFolder(auth, params);
|
|
33
|
+
return resultContent(result);
|
|
34
|
+
});
|
|
35
|
+
server.registerTool("sf_share_report_folder", {
|
|
36
|
+
title: "Share Report or Dashboard Folder",
|
|
37
|
+
description: `Shares a Report or Dashboard folder with users, roles, groups, or territories. Sets access levels (View, Edit, Manage) per share recipient. Use after creating a folder to grant team members access.`,
|
|
38
|
+
inputSchema: ShareReportFolderSchema,
|
|
39
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
40
|
+
}, async (params) => {
|
|
41
|
+
const auth = await getAuth();
|
|
42
|
+
const result = await shareReportFolder(auth, params);
|
|
43
|
+
return resultContent(result);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=reports.js.map
|
package/dist/tools/security.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreatePermissionSetSchema, CreateRoleSchema, CreateQueueSchema, CreateNamedCredentialSchema, } from "../schemas/index.js";
|
|
2
|
-
import { getAuth, createPermissionSet, createRole, createQueue, createNamedCredential, } from "../services/salesforce.js";
|
|
1
|
+
import { CreatePermissionSetSchema, CreateRoleSchema, CreateQueueSchema, CreateNamedCredentialSchema, AssignPermissionSetSchema, CreatePermissionSetGroupSchema, UpdatePermissionSetSchema, CreateMutingPermissionSetSchema, SetFieldLevelSecuritySchema, SetOrgWideDefaultsSchema, CreateProfileSchema, UpdateProfileSchema, } from "../schemas/index.js";
|
|
2
|
+
import { getAuth, createPermissionSet, createRole, createQueue, createNamedCredential, assignPermissionSet, createPermissionSetGroup, updatePermissionSet, createMutingPermissionSet, setFieldLevelSecurity, setOrgWideDefaults, cloneProfile, updateProfile, } from "../services/salesforce.js";
|
|
3
3
|
import { resultContent } from "./utils.js";
|
|
4
4
|
export function registerSecurityTools(server) {
|
|
5
5
|
server.registerTool("sf_create_permission_set", {
|
|
@@ -78,5 +78,85 @@ export function registerSecurityTools(server) {
|
|
|
78
78
|
});
|
|
79
79
|
return resultContent(result);
|
|
80
80
|
});
|
|
81
|
+
server.registerTool("sf_assign_permission_set", {
|
|
82
|
+
title: "Assign Permission Set to User",
|
|
83
|
+
description: `Assigns an existing Permission Set to a user. Provide the permissionSetName and either the user's username or userId. The assignment takes effect immediately.`,
|
|
84
|
+
inputSchema: AssignPermissionSetSchema,
|
|
85
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
86
|
+
}, async (params) => {
|
|
87
|
+
const auth = await getAuth();
|
|
88
|
+
const result = await assignPermissionSet(auth, params);
|
|
89
|
+
return resultContent(result);
|
|
90
|
+
});
|
|
91
|
+
server.registerTool("sf_create_permission_set_group", {
|
|
92
|
+
title: "Create Permission Set Group",
|
|
93
|
+
description: `Creates a Permission Set Group that combines multiple Permission Sets. Users assigned to the group receive all permissions from all included sets. Optionally create a Muting Permission Set to restrict permissions within the group.`,
|
|
94
|
+
inputSchema: CreatePermissionSetGroupSchema,
|
|
95
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
96
|
+
}, async (params) => {
|
|
97
|
+
const auth = await getAuth();
|
|
98
|
+
const result = await createPermissionSetGroup(auth, params);
|
|
99
|
+
return resultContent(result);
|
|
100
|
+
});
|
|
101
|
+
server.registerTool("sf_update_permission_set", {
|
|
102
|
+
title: "Update Permission Set (Object & Field Permissions)",
|
|
103
|
+
description: `Updates an existing Permission Set by adding or modifying object and field-level permissions. Provide the permission set name and arrays of objectPermissions or fieldPermissions to set. Existing permissions not listed remain unchanged.`,
|
|
104
|
+
inputSchema: UpdatePermissionSetSchema,
|
|
105
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
106
|
+
}, async (params) => {
|
|
107
|
+
const auth = await getAuth();
|
|
108
|
+
const result = await updatePermissionSet(auth, params);
|
|
109
|
+
return resultContent(result);
|
|
110
|
+
});
|
|
111
|
+
server.registerTool("sf_create_muting_permission_set", {
|
|
112
|
+
title: "Create Muting Permission Set",
|
|
113
|
+
description: `Creates a Muting Permission Set that removes specific permissions from users within a Permission Set Group. Only valid within a Permission Set Group context.`,
|
|
114
|
+
inputSchema: CreateMutingPermissionSetSchema,
|
|
115
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
116
|
+
}, async (params) => {
|
|
117
|
+
const auth = await getAuth();
|
|
118
|
+
const result = await createMutingPermissionSet(auth, params);
|
|
119
|
+
return resultContent(result);
|
|
120
|
+
});
|
|
121
|
+
server.registerTool("sf_set_field_level_security", {
|
|
122
|
+
title: "Set Field-Level Security",
|
|
123
|
+
description: `Sets read/edit field-level security for a specific field across one or more Profiles and/or Permission Sets. Use to make a field visible and/or editable without manually editing each profile.`,
|
|
124
|
+
inputSchema: SetFieldLevelSecuritySchema,
|
|
125
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
126
|
+
}, async (params) => {
|
|
127
|
+
const auth = await getAuth();
|
|
128
|
+
const result = await setFieldLevelSecurity(auth, params);
|
|
129
|
+
return resultContent(result);
|
|
130
|
+
});
|
|
131
|
+
server.registerTool("sf_set_org_wide_defaults", {
|
|
132
|
+
title: "Set Org-Wide Sharing Defaults",
|
|
133
|
+
description: `Sets the org-wide default sharing model for a custom or standard object. Internal access options: Private, Read, ReadWrite, ControlledByParent. External sharing can be set separately.`,
|
|
134
|
+
inputSchema: SetOrgWideDefaultsSchema,
|
|
135
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
136
|
+
}, async (params) => {
|
|
137
|
+
const auth = await getAuth();
|
|
138
|
+
const result = await setOrgWideDefaults(auth, params);
|
|
139
|
+
return resultContent(result);
|
|
140
|
+
});
|
|
141
|
+
server.registerTool("sf_clone_profile", {
|
|
142
|
+
title: "Clone Profile",
|
|
143
|
+
description: `Creates a new Profile by cloning an existing one. The new profile inherits all permissions, page layout assignments, and field-level security from the source profile. Useful for creating profiles with slight variations.`,
|
|
144
|
+
inputSchema: CreateProfileSchema,
|
|
145
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
146
|
+
}, async (params) => {
|
|
147
|
+
const auth = await getAuth();
|
|
148
|
+
const result = await cloneProfile(auth, params);
|
|
149
|
+
return resultContent(result);
|
|
150
|
+
});
|
|
151
|
+
server.registerTool("sf_update_profile", {
|
|
152
|
+
title: "Update Profile (Object, Field, Tab, App Permissions)",
|
|
153
|
+
description: `Updates object permissions, field-level security, tab visibility, and application visibility on an existing Profile. Provide only the permissions you want to change — existing settings not listed remain unchanged.`,
|
|
154
|
+
inputSchema: UpdateProfileSchema,
|
|
155
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
156
|
+
}, async (params) => {
|
|
157
|
+
const auth = await getAuth();
|
|
158
|
+
const result = await updateProfile(auth, params);
|
|
159
|
+
return resultContent(result);
|
|
160
|
+
});
|
|
81
161
|
}
|
|
82
162
|
//# sourceMappingURL=security.js.map
|
package/dist/tools/ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreateLightningAppSchema, CreateTabSchema, CreateCompactLayoutSchema, CreateListViewSchema, CreateEmailTemplateSchema, CreateStaticResourceSchema, CreateCustomNotificationTypeSchema, CreateReportTypeSchema, CreateDashboardSchema, } from "../schemas/index.js";
|
|
2
|
-
import { getAuth, createLightningApp, createTab, createCompactLayout, createListView, createEmailTemplate, createCustomNotificationType, createReportType, } from "../services/salesforce.js";
|
|
1
|
+
import { CreateLightningAppSchema, CreateTabSchema, CreateCompactLayoutSchema, CreateListViewSchema, CreateEmailTemplateSchema, CreateStaticResourceSchema, CreateCustomNotificationTypeSchema, CreateReportTypeSchema, CreateDashboardSchema, UpdatePageLayoutSchema, AssignPageLayoutSchema, CreateLightningRecordPageSchema, CreateLightningHomePageSchema, UpdateLightningPageSchema, AssignLightningPageSchema, AssignCompactLayoutSchema, } from "../schemas/index.js";
|
|
2
|
+
import { getAuth, createLightningApp, createTab, createCompactLayout, createListView, createEmailTemplate, createCustomNotificationType, createReportType, updatePageLayout, assignPageLayout, createFlexiPage, updateFlexiPage, assignFlexiPage, assignCompactLayout, } from "../services/salesforce.js";
|
|
3
3
|
import { buildStaticResourceZip, deployZip, pollDeployStatus, } from "../services/deployment.js";
|
|
4
4
|
import { API_VERSION } from "../services/salesforce.js";
|
|
5
5
|
import { resultContent } from "./utils.js";
|
|
@@ -191,5 +191,75 @@ export function registerUiTools(server) {
|
|
|
191
191
|
const result = await upsertMetadata(auth, xml);
|
|
192
192
|
return resultContent(result);
|
|
193
193
|
});
|
|
194
|
+
server.registerTool("sf_update_page_layout", {
|
|
195
|
+
title: "Update Page Layout",
|
|
196
|
+
description: `Updates an existing Page Layout by reading the current layout from the org and applying changes. Currently supports renaming the layout. For full section/field changes, use sf_create_page_layout to create a new layout.`,
|
|
197
|
+
inputSchema: UpdatePageLayoutSchema,
|
|
198
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
199
|
+
}, async (params) => {
|
|
200
|
+
const auth = await getAuth();
|
|
201
|
+
const result = await updatePageLayout(auth, params);
|
|
202
|
+
return resultContent(result);
|
|
203
|
+
});
|
|
204
|
+
server.registerTool("sf_assign_page_layout", {
|
|
205
|
+
title: "Assign Page Layout to Profile(s)",
|
|
206
|
+
description: `Assigns a Page Layout to one or more Profiles for a given object. All listed profiles will be updated to use the specified layout for that object's detail and edit pages.`,
|
|
207
|
+
inputSchema: AssignPageLayoutSchema,
|
|
208
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
209
|
+
}, async (params) => {
|
|
210
|
+
const auth = await getAuth();
|
|
211
|
+
const result = await assignPageLayout(auth, params);
|
|
212
|
+
return resultContent(result);
|
|
213
|
+
});
|
|
214
|
+
server.registerTool("sf_create_lightning_record_page", {
|
|
215
|
+
title: "Create Lightning Record Page (FlexiPage)",
|
|
216
|
+
description: `Creates a Lightning Record Page (FlexiPage of type RecordPage) with regions and components. Use to build custom Lightning record pages for an object with specific layouts, related lists, and custom components.`,
|
|
217
|
+
inputSchema: CreateLightningRecordPageSchema,
|
|
218
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
219
|
+
}, async (params) => {
|
|
220
|
+
const auth = await getAuth();
|
|
221
|
+
const result = await createFlexiPage(auth, { ...params, pageType: "RecordPage" });
|
|
222
|
+
return resultContent(result);
|
|
223
|
+
});
|
|
224
|
+
server.registerTool("sf_create_lightning_home_page", {
|
|
225
|
+
title: "Create Lightning Home Page (FlexiPage)",
|
|
226
|
+
description: `Creates a Lightning Home Page (FlexiPage of type HomePage) with regions and components. Home Pages appear in the Lightning App's home tab and can display dashboards, reports, or custom components.`,
|
|
227
|
+
inputSchema: CreateLightningHomePageSchema,
|
|
228
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
229
|
+
}, async (params) => {
|
|
230
|
+
const auth = await getAuth();
|
|
231
|
+
const result = await createFlexiPage(auth, { ...params, pageType: "HomePage" });
|
|
232
|
+
return resultContent(result);
|
|
233
|
+
});
|
|
234
|
+
server.registerTool("sf_update_lightning_page", {
|
|
235
|
+
title: "Update Lightning Page (FlexiPage)",
|
|
236
|
+
description: `Updates an existing Lightning Page (FlexiPage) by reading its current configuration and applying label changes. Use to rename or modify existing Lightning record or home pages.`,
|
|
237
|
+
inputSchema: UpdateLightningPageSchema,
|
|
238
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
239
|
+
}, async (params) => {
|
|
240
|
+
const auth = await getAuth();
|
|
241
|
+
const result = await updateFlexiPage(auth, params);
|
|
242
|
+
return resultContent(result);
|
|
243
|
+
});
|
|
244
|
+
server.registerTool("sf_assign_lightning_page", {
|
|
245
|
+
title: "Assign Lightning Page to Experience Site",
|
|
246
|
+
description: `Assigns a Lightning Page (FlexiPage) to an Experience Cloud site via the Connect API. Use after creating a Lightning page to make it active within a specific community.`,
|
|
247
|
+
inputSchema: AssignLightningPageSchema,
|
|
248
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
249
|
+
}, async (params) => {
|
|
250
|
+
const auth = await getAuth();
|
|
251
|
+
const result = await assignFlexiPage(auth, params);
|
|
252
|
+
return resultContent(result);
|
|
253
|
+
});
|
|
254
|
+
server.registerTool("sf_assign_compact_layout", {
|
|
255
|
+
title: "Set Default Compact Layout for Object",
|
|
256
|
+
description: `Sets the default compact layout for a custom or standard object. The compact layout controls the fields shown in record highlights, mobile cards, and hover panels. The compact layout must already exist on the object.`,
|
|
257
|
+
inputSchema: AssignCompactLayoutSchema,
|
|
258
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
259
|
+
}, async (params) => {
|
|
260
|
+
const auth = await getAuth();
|
|
261
|
+
const result = await assignCompactLayout(auth, params);
|
|
262
|
+
return resultContent(result);
|
|
263
|
+
});
|
|
194
264
|
}
|
|
195
265
|
//# sourceMappingURL=ui.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "salesforce-metadata-mcp",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "The most comprehensive Salesforce
|
|
3
|
+
"version": "2.2.0",
|
|
4
|
+
"description": "The most comprehensive Salesforce MCP server: 110+ tools for metadata, Apex, LWC, Agentforce agents, Experience Cloud, bulk data, users, reports, security, and more",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
@@ -47,7 +47,18 @@
|
|
|
47
47
|
"salesforce-dx",
|
|
48
48
|
"crm",
|
|
49
49
|
"automation",
|
|
50
|
-
"lightning"
|
|
50
|
+
"lightning",
|
|
51
|
+
"permission-set",
|
|
52
|
+
"page-layout",
|
|
53
|
+
"reports",
|
|
54
|
+
"dashboard",
|
|
55
|
+
"experience-cloud",
|
|
56
|
+
"community",
|
|
57
|
+
"users",
|
|
58
|
+
"bulk-api",
|
|
59
|
+
"visualforce",
|
|
60
|
+
"aura",
|
|
61
|
+
"formula-fields"
|
|
51
62
|
],
|
|
52
63
|
"dependencies": {
|
|
53
64
|
"@modelcontextprotocol/sdk": "1.29.0",
|