salesforce-metadata-mcp 2.1.4 → 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/CHANGELOG.md +81 -0
- package/README.md +106 -19
- package/dist/index.js +2 -2
- package/dist/schemas/index.js +374 -0
- package/dist/services/deployment.js +24 -1
- package/dist/services/salesforce.js +794 -0
- package/dist/tools/agentforce.js +3 -3
- 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/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",
|