salesforce-metadata-mcp 2.5.4 → 2.5.6
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 +52 -0
- package/README.md +1 -1
- package/TOOLS.md +19 -3
- package/dist/index.js +4 -4
- package/dist/schemas/index.d.ts +1723 -214
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +606 -82
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/deployment.d.ts +2 -0
- package/dist/services/deployment.d.ts.map +1 -1
- package/dist/services/deployment.js +64 -58
- package/dist/services/deployment.js.map +1 -1
- package/dist/services/salesforce.d.ts +94 -10
- package/dist/services/salesforce.d.ts.map +1 -1
- package/dist/services/salesforce.js +1717 -333
- package/dist/services/salesforce.js.map +1 -1
- package/dist/services/tooling.js +1 -1
- package/dist/services/tooling.js.map +1 -1
- package/dist/tools/actions.d.ts +3 -0
- package/dist/tools/actions.d.ts.map +1 -0
- package/dist/tools/actions.js +46 -0
- package/dist/tools/actions.js.map +1 -0
- package/dist/tools/admin.d.ts.map +1 -1
- package/dist/tools/admin.js +48 -2
- package/dist/tools/admin.js.map +1 -1
- package/dist/tools/apex.d.ts.map +1 -1
- package/dist/tools/apex.js +15 -2
- package/dist/tools/apex.js.map +1 -1
- package/dist/tools/aura.d.ts +3 -0
- package/dist/tools/aura.d.ts.map +1 -0
- package/dist/tools/aura.js +36 -0
- package/dist/tools/aura.js.map +1 -0
- package/dist/tools/automation.d.ts.map +1 -1
- package/dist/tools/automation.js +84 -2
- package/dist/tools/automation.js.map +1 -1
- package/dist/tools/comms.d.ts +3 -0
- package/dist/tools/comms.d.ts.map +1 -0
- package/dist/tools/comms.js +38 -0
- package/dist/tools/comms.js.map +1 -0
- package/dist/tools/cpq.d.ts +3 -0
- package/dist/tools/cpq.d.ts.map +1 -0
- package/dist/tools/cpq.js +70 -0
- package/dist/tools/cpq.js.map +1 -0
- package/dist/tools/data.d.ts.map +1 -1
- package/dist/tools/data.js +73 -2
- package/dist/tools/data.js.map +1 -1
- package/dist/tools/devops.d.ts +3 -0
- package/dist/tools/devops.d.ts.map +1 -0
- package/dist/tools/devops.js +234 -0
- package/dist/tools/devops.js.map +1 -0
- package/dist/tools/flows.d.ts +3 -0
- package/dist/tools/flows.d.ts.map +1 -0
- package/dist/tools/flows.js +36 -0
- package/dist/tools/flows.js.map +1 -0
- package/dist/tools/i18n.d.ts +3 -0
- package/dist/tools/i18n.d.ts.map +1 -0
- package/dist/tools/i18n.js +26 -0
- package/dist/tools/i18n.js.map +1 -0
- package/dist/tools/identity.d.ts +3 -0
- package/dist/tools/identity.d.ts.map +1 -0
- package/dist/tools/identity.js +36 -0
- package/dist/tools/identity.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +26 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/integrations.js +1 -1
- package/dist/tools/integrations.js.map +1 -1
- package/dist/tools/knowledge.d.ts +3 -0
- package/dist/tools/knowledge.d.ts.map +1 -0
- package/dist/tools/knowledge.js +36 -0
- package/dist/tools/knowledge.js.map +1 -0
- package/dist/tools/lwc.d.ts.map +1 -1
- package/dist/tools/lwc.js +70 -2
- package/dist/tools/lwc.js.map +1 -1
- package/dist/tools/metadata.d.ts.map +1 -1
- package/dist/tools/metadata.js +41 -2
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/monitoring.js +1 -1
- package/dist/tools/monitoring.js.map +1 -1
- package/dist/tools/omnistudio.d.ts.map +1 -1
- package/dist/tools/omnistudio.js.map +1 -1
- package/dist/tools/pages.d.ts +3 -0
- package/dist/tools/pages.d.ts.map +1 -0
- package/dist/tools/pages.js +36 -0
- package/dist/tools/pages.js.map +1 -0
- package/dist/tools/sandbox.d.ts +3 -0
- package/dist/tools/sandbox.d.ts.map +1 -0
- package/dist/tools/sandbox.js +37 -0
- package/dist/tools/sandbox.js.map +1 -0
- package/dist/tools/security.d.ts.map +1 -1
- package/dist/tools/security.js +75 -4
- package/dist/tools/security.js.map +1 -1
- package/dist/tools/streaming.d.ts +3 -0
- package/dist/tools/streaming.d.ts.map +1 -0
- package/dist/tools/streaming.js +36 -0
- package/dist/tools/streaming.js.map +1 -0
- package/dist/tools/ui.js +1 -1
- package/dist/tools/ui.js.map +1 -1
- package/dist/tools/visualforce.d.ts +3 -0
- package/dist/tools/visualforce.d.ts.map +1 -0
- package/dist/tools/visualforce.js +36 -0
- package/dist/tools/visualforce.js.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.5.6] - 2026-06-05
|
|
4
|
+
|
|
5
|
+
### Flow Builder Bug Fixes + Deploy Inline XML + New `sf_create_flow_from_xml` Tool
|
|
6
|
+
|
|
7
|
+
Eight real-world bugs fixed based on production usage of the flow builder and deployment tools.
|
|
8
|
+
|
|
9
|
+
#### Bug fixes — `sf_create_flow` (flow XML builder)
|
|
10
|
+
|
|
11
|
+
- **Bug 1 — Loop connectors (HTTP 500):** Loop elements now emit the correct `<nextValueConnector>` (loop body) and `<noMoreValuesConnector>` (after loop exits) XML. Previously, a single `<connector>` was generated, which is not valid for Loop elements and caused a Salesforce 500 error on deploy. Use `loopBodyElement` for the body and `nextElement` for the exit path.
|
|
12
|
+
|
|
13
|
+
- **Bug 2 — GetRecords filter value type:** GetRecords filter values are now correctly typed. When `filterValue` (literal string) is provided, `<stringValue>` is used; when `filterValueRef` (flow variable) is provided, `<elementReference>` is used. Previously, every filter value was unconditionally wrapped in `<elementReference>`, causing failures when the filter value was a plain string.
|
|
14
|
+
|
|
15
|
+
- **Bug 3 — String-match operators in GetRecords:** `Contains`, `NotContain`, `StartsWith`, and `EndsWith` filter operators now always use `<stringValue>` for the filter value, matching what Salesforce Flow expects. `IsNull` now uses `<booleanValue>`. Previously, these operators generated the wrong value element type.
|
|
16
|
+
|
|
17
|
+
- **Bug 4 — Loop iteration variable:** Removed the invalid `<iterationVariable>` XML element from Loop nodes — this element does not exist in the Salesforce Flow Metadata API schema. The collection item variable must be declared in the flow's `variables` array and referenced by name in downstream Assignment elements via `valueRef`.
|
|
18
|
+
|
|
19
|
+
- **Bug 5 — Decision element connectors:** Each Decision rule (outcome) now generates its own `<connector>` using the new per-condition `nextElement` field. Previously, all rules shared a single connector target, making proper branching impossible. `IsNull`/`IsNotNull` operators now generate `<booleanValue>` for the right-value element instead of `<stringValue>`.
|
|
20
|
+
|
|
21
|
+
- **Bug 6 — GetRecords missing fields:** GetRecords elements now support `queriedFields` (list of fields to return), `sortField`, `sortOrder` (Asc/Desc), `limitValue`, and `getFirstRecordOnly`. Previously, no sorting, limiting, or field selection was possible via the tool.
|
|
22
|
+
|
|
23
|
+
#### Bug fix — `sf_deploy_metadata`
|
|
24
|
+
|
|
25
|
+
- **Bug 7 — Inline XML content:** Components can now include `xmlContent` (the raw XML string) and an optional `filePath` (inferred from type/name if omitted). When `xmlContent` is provided, the file is included in the deploy zip so the component is actually created or updated. Previously, only a `package.xml` manifest was generated — deploying a component that didn't already exist in the org would silently fail with "No metadata found to deploy."
|
|
26
|
+
|
|
27
|
+
#### New tool — `sf_create_flow_from_xml`
|
|
28
|
+
|
|
29
|
+
- **Bug 8 — No escape hatch for complex flows:** Added `sf_create_flow_from_xml` for deploying a Salesforce Flow by providing the complete Flow XML string. Use when `sf_create_flow`'s structured builder cannot express what you need — multi-level branching, Wait elements, or flows exported from another org. Accepts `apiName`, `flowXml` (complete XML), and `activate` (boolean). Deploys via Metadata API zip and optionally activates after deploy.
|
|
30
|
+
|
|
31
|
+
#### Schema additions
|
|
32
|
+
- `FlowElementSchema`: new fields `loopBodyElement`, `filterValue`, `queriedFields`, `sortField`, `sortOrder`, `limitValue`, `getFirstRecordOnly`; per-condition `nextElement` on `conditions` array items
|
|
33
|
+
- `DeployComponentSchema`: extends `ComponentRefSchema` with optional `xmlContent` and `filePath`
|
|
34
|
+
- `CreateFlowFromXmlSchema`: new schema for `sf_create_flow_from_xml`
|
|
35
|
+
|
|
36
|
+
Tool count: **133** (+1: `sf_create_flow_from_xml`)
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## [2.5.5] - 2026-06-03
|
|
41
|
+
|
|
42
|
+
### Auth & Quality — Token Refresh + Code Analyzer Fixes
|
|
43
|
+
|
|
44
|
+
#### Auth improvement
|
|
45
|
+
- **`getFreshTokenFromCLI`**: switched from `sf org display` (which redacts the access token since Salesforce CLI v2.50) to `sf org auth show-access-token`, restoring `SF_ALIAS`-based authentication
|
|
46
|
+
|
|
47
|
+
#### Code quality
|
|
48
|
+
- **Salesforce Code Analyzer v5**: fixed all 544 violations across `src/` — no unused variables, all `let` → `const`, no `@typescript-eslint/no-explicit-any` warnings where the dynamic type was intentional, bias-neutral terminology throughout
|
|
49
|
+
- **TypeScript strict mode**: zero compiler errors; `@ts-nocheck` removed from all source files
|
|
50
|
+
|
|
51
|
+
Tool count: **132** (unchanged)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
3
55
|
## [2.5.4] - 2026-06-03
|
|
4
56
|
|
|
5
57
|
### TypeScript Source Sync — Proper Typing for All 132 Tools
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# salesforce-metadata-mcp
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.com/package/salesforce-metadata-mcp)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](https://modelcontextprotocol.io)
|
|
6
6
|
|
package/TOOLS.md
CHANGED
|
@@ -155,12 +155,12 @@ Creates an Agentforce Einstein Copilot agent.
|
|
|
155
155
|
---
|
|
156
156
|
|
|
157
157
|
### sf_deploy_metadata
|
|
158
|
-
Deploys metadata components via SOAP deploy.
|
|
158
|
+
Deploys metadata components via SOAP deploy. Include `xmlContent` on each component to embed the XML definition in the zip — required when creating or updating a component whose source isn't already in the org.
|
|
159
159
|
|
|
160
160
|
**Parameters:**
|
|
161
161
|
| Parameter | Type | Description |
|
|
162
162
|
|-----------|------|-------------|
|
|
163
|
-
| `components` | array | `[{type, name}]`
|
|
163
|
+
| `components` | array | `[{type, name, xmlContent?, filePath?}]` — `xmlContent` includes the file in the zip |
|
|
164
164
|
| `checkOnly` | boolean | Validate without deploying |
|
|
165
165
|
| `runTests` | array | Test classes to run |
|
|
166
166
|
| `rollbackOnError` | boolean | Rollback on any failure |
|
|
@@ -169,7 +169,23 @@ Deploys metadata components via SOAP deploy.
|
|
|
169
169
|
**Example prompts:**
|
|
170
170
|
- "Deploy the AccountService Apex class and AccountTrigger to the org"
|
|
171
171
|
- "Validate the deployment of these components without making changes"
|
|
172
|
-
- "Deploy
|
|
172
|
+
- "Deploy this Flow XML to the org: ..." (provide xmlContent)
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### sf_create_flow_from_xml
|
|
177
|
+
Deploys a Salesforce Flow by providing the complete Flow XML string. Use as an escape hatch when `sf_create_flow` cannot express a complex flow.
|
|
178
|
+
|
|
179
|
+
**Parameters:**
|
|
180
|
+
| Parameter | Type | Description |
|
|
181
|
+
|-----------|------|-------------|
|
|
182
|
+
| `apiName` | string | Flow API name (no spaces, starts with letter) |
|
|
183
|
+
| `flowXml` | string | Complete Flow XML starting with `<?xml version...` |
|
|
184
|
+
| `activate` | boolean | Activate after deployment (default false) |
|
|
185
|
+
|
|
186
|
+
**Example prompts:**
|
|
187
|
+
- "Deploy this exported flow XML to my org and activate it"
|
|
188
|
+
- "Create a flow from this XML I copied from production"
|
|
173
189
|
|
|
174
190
|
---
|
|
175
191
|
|
package/dist/index.js
CHANGED
|
@@ -6,14 +6,14 @@ import { createServer } from "http";
|
|
|
6
6
|
import { registerTools } from "./tools/index.js";
|
|
7
7
|
const server = new McpServer({
|
|
8
8
|
name: "salesforce-metadata-mcp",
|
|
9
|
-
version: "2.5.
|
|
9
|
+
version: "2.5.6",
|
|
10
10
|
});
|
|
11
11
|
registerTools(server);
|
|
12
12
|
// ─── Transport: stdio ─────────────────────────────────────────────────────────
|
|
13
13
|
async function runStdio() {
|
|
14
14
|
const transport = new StdioServerTransport();
|
|
15
15
|
await server.connect(transport);
|
|
16
|
-
console.error("Salesforce Metadata MCP server v2.5.
|
|
16
|
+
console.error("Salesforce Metadata MCP server v2.5.6 running on stdio");
|
|
17
17
|
}
|
|
18
18
|
// ─── Transport: HTTP ──────────────────────────────────────────────────────────
|
|
19
19
|
function readBody(req) {
|
|
@@ -38,7 +38,7 @@ async function runHTTP() {
|
|
|
38
38
|
const url = req.url ?? "/";
|
|
39
39
|
if (url === "/health" && req.method === "GET") {
|
|
40
40
|
res.writeHead(200, { "Content-Type": "application/json" });
|
|
41
|
-
res.end(JSON.stringify({ status: "ok", server: "salesforce-metadata-mcp", version: "2.5.
|
|
41
|
+
res.end(JSON.stringify({ status: "ok", server: "salesforce-metadata-mcp", version: "2.5.6" }));
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
if (url === "/mcp" && req.method === "POST") {
|
|
@@ -64,7 +64,7 @@ async function runHTTP() {
|
|
|
64
64
|
res.end(JSON.stringify({ error: "Not found" }));
|
|
65
65
|
});
|
|
66
66
|
httpServer.listen(port, () => {
|
|
67
|
-
console.error(`Salesforce Metadata MCP server v2.5.
|
|
67
|
+
console.error(`Salesforce Metadata MCP server v2.5.6 running on http://localhost:${port}/mcp`);
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
// ─── Entry point ──────────────────────────────────────────────────────────────
|