salesforce-metadata-mcp 3.0.0 → 3.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 +167 -1
- package/README.md +25 -5
- package/TOOLS.md +326 -326
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +494 -130
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +122 -29
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/deployment.d.ts.map +1 -1
- package/dist/services/deployment.js +19 -3
- package/dist/services/deployment.js.map +1 -1
- package/dist/services/impact.d.ts.map +1 -1
- package/dist/services/impact.js +9 -1
- package/dist/services/impact.js.map +1 -1
- package/dist/services/salesforce.d.ts +29 -0
- package/dist/services/salesforce.d.ts.map +1 -1
- package/dist/services/salesforce.js +1342 -323
- package/dist/services/salesforce.js.map +1 -1
- package/dist/services/tooling.d.ts.map +1 -1
- package/dist/services/tooling.js +28 -3
- package/dist/services/tooling.js.map +1 -1
- package/dist/tools/automation.d.ts.map +1 -1
- package/dist/tools/automation.js +18 -6
- package/dist/tools/automation.js.map +1 -1
- package/dist/tools/data.d.ts.map +1 -1
- package/dist/tools/data.js +4 -2
- package/dist/tools/data.js.map +1 -1
- package/dist/tools/experience.d.ts.map +1 -1
- package/dist/tools/experience.js +8 -1
- package/dist/tools/experience.js.map +1 -1
- package/dist/tools/ui.d.ts.map +1 -1
- package/dist/tools/ui.js +16 -4
- package/dist/tools/ui.js.map +1 -1
- package/dist/toolsets.d.ts +101 -2
- package/dist/toolsets.d.ts.map +1 -1
- package/dist/toolsets.js +360 -25
- package/dist/toolsets.js.map +1 -1
- package/package.json +3 -2
package/TOOLS.md
CHANGED
|
@@ -1,326 +1,326 @@
|
|
|
1
|
-
# Tools Reference
|
|
2
|
-
|
|
3
|
-
Complete documentation for all 228 tools in `salesforce-metadata-mcp`. (Highlights below cover the most commonly used tools in depth; see the README's full 228-tool table for every tool name.)
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Objects & Fields
|
|
8
|
-
|
|
9
|
-
### sf_create_custom_object
|
|
10
|
-
Creates a new Salesforce Custom Object using the Metadata API.
|
|
11
|
-
|
|
12
|
-
**Parameters:**
|
|
13
|
-
| Parameter | Type | Default | Description |
|
|
14
|
-
|-----------|------|---------|-------------|
|
|
15
|
-
| `fullName` | string | required | API name ending in `__c`, e.g. `Invoice__c` |
|
|
16
|
-
| `label` | string | required | Singular display label |
|
|
17
|
-
| `pluralLabel` | string | required | Plural display label |
|
|
18
|
-
| `description` | string | — | Optional description |
|
|
19
|
-
| `nameFieldLabel` | string | `"Name"` | Label for the standard Name field |
|
|
20
|
-
| `nameFieldType` | `Text\|AutoNumber` | `"Text"` | Name field type |
|
|
21
|
-
| `autoNumberFormat` | string | — | Format for AutoNumber, e.g. `INV-{0000}` |
|
|
22
|
-
| `deploymentStatus` | `Deployed\|InDevelopment` | `"Deployed"` | Deployment status |
|
|
23
|
-
| `sharingModel` | `ReadWrite\|Read\|Private\|...` | `"ReadWrite"` | OWD sharing model |
|
|
24
|
-
| `enableActivities` | boolean | `true` | Allow Tasks/Events |
|
|
25
|
-
| `enableHistory` | boolean | `false` | Enable field history tracking |
|
|
26
|
-
| `enableReports` | boolean | `true` | Available in Reports |
|
|
27
|
-
| `enableSearch` | boolean | `true` | Searchable |
|
|
28
|
-
|
|
29
|
-
**Example prompts:**
|
|
30
|
-
- "Create a custom object called Project__c with plural label Projects"
|
|
31
|
-
- "Create a Job Application object with AutoNumber name format JOB-{0000}"
|
|
32
|
-
- "Create a custom object called Feedback__c with Private sharing and no activities"
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
### sf_create_custom_field
|
|
37
|
-
Creates a new field on an existing object.
|
|
38
|
-
|
|
39
|
-
**Parameters:**
|
|
40
|
-
| Parameter | Type | Description |
|
|
41
|
-
|-----------|------|-------------|
|
|
42
|
-
| `objectName` | string | Parent object API name |
|
|
43
|
-
| `fieldName` | string | Field API name ending in `__c` |
|
|
44
|
-
| `label` | string | Display label |
|
|
45
|
-
| `type` | FieldType | Text, Number, Picklist, Lookup, etc. |
|
|
46
|
-
| `required` | boolean | Is field required |
|
|
47
|
-
| `unique` | boolean | Must values be unique |
|
|
48
|
-
| `length` | number | For Text fields (1-255) |
|
|
49
|
-
| `precision` / `scale` | number | For Number/Currency fields |
|
|
50
|
-
| `picklistValues` | object | Required for Picklist/MultiselectPicklist |
|
|
51
|
-
| `referenceTo` | string | For Lookup/MasterDetail |
|
|
52
|
-
| `deleteConstraint` | string | For Lookup: Cascade/Restrict/SetNull |
|
|
53
|
-
|
|
54
|
-
**Example prompts:**
|
|
55
|
-
- "Add a Status__c picklist field to Invoice__c with values: Draft, Pending, Approved, Rejected"
|
|
56
|
-
- "Add an Amount__c currency field to Opportunity with 2 decimal places"
|
|
57
|
-
- "Add a lookup from Project__c to Account"
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
### sf_describe_object
|
|
62
|
-
Reads an object's full schema via the REST Describe API — fields, types, picklist values, child relationships, and record types. Call this before querying or creating records on an unfamiliar object.
|
|
63
|
-
|
|
64
|
-
**Parameters:**
|
|
65
|
-
| Parameter | Type | Default | Description |
|
|
66
|
-
|-----------|------|---------|-------------|
|
|
67
|
-
| `objectApiName` | string | required | SObject API name, e.g. `Account` |
|
|
68
|
-
| `fieldsOnly` | boolean | `false` | Return only the field list, omitting child relationships/record types, for a smaller/faster response |
|
|
69
|
-
|
|
70
|
-
**Example prompts:**
|
|
71
|
-
- "What fields are on the Opportunity object?"
|
|
72
|
-
- "Describe the Case object schema before I query it"
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
### sf_create_custom_metadata_type
|
|
77
|
-
Creates a Custom Metadata Type (__mdt) for storing configuration.
|
|
78
|
-
|
|
79
|
-
**Parameters:**
|
|
80
|
-
| Parameter | Type | Description |
|
|
81
|
-
|-----------|------|-------------|
|
|
82
|
-
| `fullName` | string | API name ending in `__mdt` |
|
|
83
|
-
| `label` | string | Singular label |
|
|
84
|
-
| `pluralLabel` | string | Plural label |
|
|
85
|
-
| `description` | string | Optional description |
|
|
86
|
-
| `fields` | array | Custom fields to add |
|
|
87
|
-
|
|
88
|
-
**Example prompts:**
|
|
89
|
-
- "Create a Feature_Flag__mdt Custom Metadata Type with a Boolean field IsEnabled__c"
|
|
90
|
-
- "Create an Integration_Config__mdt type with fields for endpoint URL and API key"
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
### sf_create_apex_class
|
|
95
|
-
Deploys an Apex class to the org via Metadata API zip deploy.
|
|
96
|
-
|
|
97
|
-
**Parameters:**
|
|
98
|
-
| Parameter | Type | Description |
|
|
99
|
-
|-----------|------|-------------|
|
|
100
|
-
| `className` | string | Class name (no __c) |
|
|
101
|
-
| `classBody` | string | Full Apex source code |
|
|
102
|
-
| `apiVersion` | string | API version, default `62.0` |
|
|
103
|
-
|
|
104
|
-
**Example prompts:**
|
|
105
|
-
- "Create an Apex class called AccountService with a method to get all active accounts"
|
|
106
|
-
- "Create a Batch Apex class called DataCleanupBatch that deletes records older than 2 years"
|
|
107
|
-
- "Create a Schedulable class called NightlyReport that generates a report email"
|
|
108
|
-
|
|
109
|
-
**Expected output:** Deploy job ID and success/failure message with any compile errors.
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
### sf_get_apex_class
|
|
114
|
-
Reads the full source of an existing Apex class by exact name, via the Tooling API. Use before modifying a class, when debugging, or when asked to explain existing code.
|
|
115
|
-
|
|
116
|
-
**Parameters:**
|
|
117
|
-
| Parameter | Type | Description |
|
|
118
|
-
|-----------|------|-------------|
|
|
119
|
-
| `className` | string | Apex class name (exact match) |
|
|
120
|
-
|
|
121
|
-
**Example prompts:**
|
|
122
|
-
- "Show me the AccountService class"
|
|
123
|
-
- "What does the DataCleanupBatch class do?"
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
### sf_get_apex_trigger
|
|
128
|
-
Reads the full source of an existing Apex trigger by exact name, including which object it fires on and which events (before/after insert/update/delete/undelete) it's registered for.
|
|
129
|
-
|
|
130
|
-
**Parameters:**
|
|
131
|
-
| Parameter | Type | Description |
|
|
132
|
-
|-----------|------|-------------|
|
|
133
|
-
| `triggerName` | string | Apex trigger name (exact match) |
|
|
134
|
-
|
|
135
|
-
**Example prompts:**
|
|
136
|
-
- "Show me the AccountTrigger source"
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
### sf_enable_debug_logs / sf_get_debug_logs / sf_get_debug_log_body
|
|
141
|
-
A three-step chain for reading Apex debug logs. Salesforce only records activity for users with an active trace flag, so enable logging first, trigger the activity you want to inspect, then list and read the resulting logs.
|
|
142
|
-
|
|
143
|
-
**sf_enable_debug_logs parameters:**
|
|
144
|
-
| Parameter | Type | Default | Description |
|
|
145
|
-
|-----------|------|---------|-------------|
|
|
146
|
-
| `username` | string | required | Username of the user to trace |
|
|
147
|
-
| `durationMinutes` | number | `30` | How long tracing stays active (max 1440) |
|
|
148
|
-
| `debugLevel` | enum | `FINEST` | Apex code log granularity |
|
|
149
|
-
|
|
150
|
-
**sf_get_debug_logs parameters:** `username` (optional filter), `operation` (optional substring filter), `limit` (default 10).
|
|
151
|
-
|
|
152
|
-
**sf_get_debug_log_body parameters:** `logId` — from `sf_get_debug_logs`. Logs are retained by Salesforce for 24 hours only.
|
|
153
|
-
|
|
154
|
-
**Example prompts:**
|
|
155
|
-
- "Turn on debug logging for ajay@example.com, then run this flow and show me the log"
|
|
156
|
-
- "List the last 5 debug logs and show me the most recent one"
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
### sf_execute_anonymous_apex
|
|
161
|
-
Executes Apex code immediately via Tooling API.
|
|
162
|
-
|
|
163
|
-
**Parameters:**
|
|
164
|
-
| Parameter | Type | Description |
|
|
165
|
-
|-----------|------|-------------|
|
|
166
|
-
| `apexCode` | string | Apex code to execute |
|
|
167
|
-
|
|
168
|
-
**Example prompts:**
|
|
169
|
-
- "Run this Apex to update all Contact email addresses to lowercase"
|
|
170
|
-
- "Execute: System.debug(UserInfo.getUserName());"
|
|
171
|
-
- "Run anonymous Apex to backfill the missing CreatedDate__c field on all Account records"
|
|
172
|
-
|
|
173
|
-
**Expected output:** Success/failure, compile errors if any, and debug log if present.
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
### sf_create_lwc
|
|
178
|
-
Deploys a Lightning Web Component via Metadata API.
|
|
179
|
-
|
|
180
|
-
**Parameters:**
|
|
181
|
-
| Parameter | Type | Description |
|
|
182
|
-
|-----------|------|-------------|
|
|
183
|
-
| `componentName` | string | camelCase name, e.g. `accountCard` |
|
|
184
|
-
| `html` | string | Full HTML template content |
|
|
185
|
-
| `javascript` | string | Full JS controller content |
|
|
186
|
-
| `css` | string | Optional CSS |
|
|
187
|
-
| `targets` | array | Where to place the component |
|
|
188
|
-
| `isExposed` | boolean | Available in App Builder |
|
|
189
|
-
| `apiVersion` | string | Default `62.0` |
|
|
190
|
-
|
|
191
|
-
**Example prompts:**
|
|
192
|
-
- "Create an LWC called opportunityList that shows a table of open opportunities"
|
|
193
|
-
- "Create a contact card LWC with name, email, phone and make it available on Record Pages"
|
|
194
|
-
- "Create an LWC Flow Screen component for collecting address information"
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
### Agentforce Tools
|
|
199
|
-
|
|
200
|
-
> **Correct creation order:** Agent → Actions → Topics (with actions listed) → Planner. The planner (`sf_create_agent_planner`) is required — without it the agent cannot route requests to any topic.
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
### sf_create_agent
|
|
205
|
-
Creates an Agentforce Agent (Bot shell). Follow with actions, topics, and a planner.
|
|
206
|
-
|
|
207
|
-
**Parameters:**
|
|
208
|
-
| Parameter | Type | Description |
|
|
209
|
-
|-----------|------|-------------|
|
|
210
|
-
| `agentName` | string | Agent API name |
|
|
211
|
-
| `label` | string | Display name |
|
|
212
|
-
| `description` | string | Agent description |
|
|
213
|
-
| `company` | string | Company context |
|
|
214
|
-
| `persona` | string | Agent persona description |
|
|
215
|
-
| `tone` | `Formal\|Neutral\|Casual` | Communication tone |
|
|
216
|
-
| `instructions` | string | System-level instructions |
|
|
217
|
-
|
|
218
|
-
**Example prompts:**
|
|
219
|
-
- "Create an Agentforce agent called SalesBot for helping sales reps close deals"
|
|
220
|
-
- "Create a customer service agent with a formal tone for handling support cases"
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
### sf_create_agent_action
|
|
225
|
-
Creates an Agentforce Action (GenAiFunction) linked to a Flow, Apex class, or Prompt Template. Create actions before topics — you'll need to list action names when creating topics.
|
|
226
|
-
|
|
227
|
-
**Parameters:**
|
|
228
|
-
| Parameter | Type | Description |
|
|
229
|
-
|-----------|------|-------------|
|
|
230
|
-
| `agentName` | string | Parent agent API name |
|
|
231
|
-
| `topicName` | string | Intended parent topic (for reference — pass this action's name in the topic's `actions` list) |
|
|
232
|
-
| `actionName` | string | Action API name |
|
|
233
|
-
| `label` | string | Action label |
|
|
234
|
-
| `description` | string | What this action does |
|
|
235
|
-
| `type` | string | `Flow\|ApexClass\|PromptTemplate\|DataCategoryGroup\|ExternalService` |
|
|
236
|
-
| `reference` | string | API name of the Flow/Apex/PromptTemplate to invoke |
|
|
237
|
-
| `inputs` | array | `[{name, value}]` input parameter mappings |
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
### sf_create_agent_topic
|
|
242
|
-
Creates a Topic (GenAiPlugin) that defines what requests the agent handles. Pass the action names in `actions` to link them to this topic.
|
|
243
|
-
|
|
244
|
-
**Parameters:**
|
|
245
|
-
| Parameter | Type | Description |
|
|
246
|
-
|-----------|------|-------------|
|
|
247
|
-
| `agentName` | string | Parent agent API name |
|
|
248
|
-
| `topicName` | string | Topic API name |
|
|
249
|
-
| `label` | string | Topic label |
|
|
250
|
-
| `description` | string | What this topic covers |
|
|
251
|
-
| `scope` | string | What kinds of requests it handles |
|
|
252
|
-
| `instructions` | string | Step-by-step handling instructions |
|
|
253
|
-
| `actions` | array | Action API names to wire into this topic |
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
### sf_create_agent_planner
|
|
258
|
-
**The critical wiring step.** Deploys a GenAiPlanner that connects the agent (Bot) to its topics. Without this, the agent has no routing capability and appears blank in Salesforce.
|
|
259
|
-
|
|
260
|
-
**Parameters:**
|
|
261
|
-
| Parameter | Type | Description |
|
|
262
|
-
|-----------|------|-------------|
|
|
263
|
-
| `agentName` | string | Agent API name (must match existing Bot) |
|
|
264
|
-
| `label` | string | Planner label (defaults to agentName) |
|
|
265
|
-
| `topicNames` | array | All topic API names to wire to this agent |
|
|
266
|
-
|
|
267
|
-
**Example prompts:**
|
|
268
|
-
- "Wire SalesBot to its topics: OrderManagement, CaseManagement"
|
|
269
|
-
- "Create the planner for SalesBot linking topics OrderManagement and CaseManagement"
|
|
270
|
-
|
|
271
|
-
---
|
|
272
|
-
|
|
273
|
-
### sf_deploy_metadata
|
|
274
|
-
Deploys metadata components via SOAP deploy.
|
|
275
|
-
|
|
276
|
-
**Parameters:**
|
|
277
|
-
| Parameter | Type | Description |
|
|
278
|
-
|-----------|------|-------------|
|
|
279
|
-
| `components` | array | `[{type, name}]` to deploy (optional when using `componentsXml`) |
|
|
280
|
-
| `componentsXml` | array | Inline XML components `[{type, name, xml}]` to deploy |
|
|
281
|
-
| `checkOnly` | boolean | Validate without deploying |
|
|
282
|
-
| `runTests` | array | Test classes to run |
|
|
283
|
-
| `testLevel` | string | `RunLocalTests` \| `RunAllTestsInOrg` \| `RunSpecifiedTests` \| `NoTestRun` |
|
|
284
|
-
| `rollbackOnError` | boolean | Rollback on any failure |
|
|
285
|
-
| `waitMinutes` | number | Timeout (default 10 min) |
|
|
286
|
-
|
|
287
|
-
**Example prompts:**
|
|
288
|
-
- "Deploy the AccountService Apex class and AccountTrigger to the org"
|
|
289
|
-
- "Validate the deployment of these components without making changes"
|
|
290
|
-
- "Deploy MyFlow and MyClass, running MyClassTest during deployment"
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
### sf_create_mcp_server
|
|
295
|
-
Generates a complete MCP server project on disk.
|
|
296
|
-
|
|
297
|
-
**Parameters:**
|
|
298
|
-
| Parameter | Type | Description |
|
|
299
|
-
|-----------|------|-------------|
|
|
300
|
-
| `serverName` | string | Server package name |
|
|
301
|
-
| `outputDirectory` | string | Absolute path to output directory |
|
|
302
|
-
| `description` | string | Server description |
|
|
303
|
-
| `salesforceInstanceUrl` | string | Pre-configure org URL |
|
|
304
|
-
|
|
305
|
-
**Example prompts:**
|
|
306
|
-
- "Create a new MCP server called my-sf-integration in C:/projects/my-server"
|
|
307
|
-
- "Generate a Salesforce MCP server project targeting https://myorg.salesforce.com"
|
|
308
|
-
|
|
309
|
-
---
|
|
310
|
-
|
|
311
|
-
### sf_get_field_permissions
|
|
312
|
-
Reads the current field-level security grants for a field across all Profiles and Permission Sets that reference it. Complements `sf_create_field_level_security`, which sets grants but doesn't report the current state — use this to audit access before making changes.
|
|
313
|
-
|
|
314
|
-
**Parameters:**
|
|
315
|
-
| Parameter | Type | Description |
|
|
316
|
-
|-----------|------|-------------|
|
|
317
|
-
| `objectName` | string | Object API name, e.g. `Account` |
|
|
318
|
-
| `fieldName` | string | Field API name, e.g. `Revenue__c` |
|
|
319
|
-
|
|
320
|
-
**Example prompts:**
|
|
321
|
-
- "Which profiles can edit the Revenue__c field on Opportunity?"
|
|
322
|
-
- "Audit field-level security for Account.AnnualRevenue before I change it"
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
*For the complete list of all 228 tools, see [README.md](README.md).*
|
|
1
|
+
# Tools Reference
|
|
2
|
+
|
|
3
|
+
Complete documentation for all 228 tools in `salesforce-metadata-mcp`. (Highlights below cover the most commonly used tools in depth; see the README's full 228-tool table for every tool name.)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Objects & Fields
|
|
8
|
+
|
|
9
|
+
### sf_create_custom_object
|
|
10
|
+
Creates a new Salesforce Custom Object using the Metadata API.
|
|
11
|
+
|
|
12
|
+
**Parameters:**
|
|
13
|
+
| Parameter | Type | Default | Description |
|
|
14
|
+
|-----------|------|---------|-------------|
|
|
15
|
+
| `fullName` | string | required | API name ending in `__c`, e.g. `Invoice__c` |
|
|
16
|
+
| `label` | string | required | Singular display label |
|
|
17
|
+
| `pluralLabel` | string | required | Plural display label |
|
|
18
|
+
| `description` | string | — | Optional description |
|
|
19
|
+
| `nameFieldLabel` | string | `"Name"` | Label for the standard Name field |
|
|
20
|
+
| `nameFieldType` | `Text\|AutoNumber` | `"Text"` | Name field type |
|
|
21
|
+
| `autoNumberFormat` | string | — | Format for AutoNumber, e.g. `INV-{0000}` |
|
|
22
|
+
| `deploymentStatus` | `Deployed\|InDevelopment` | `"Deployed"` | Deployment status |
|
|
23
|
+
| `sharingModel` | `ReadWrite\|Read\|Private\|...` | `"ReadWrite"` | OWD sharing model |
|
|
24
|
+
| `enableActivities` | boolean | `true` | Allow Tasks/Events |
|
|
25
|
+
| `enableHistory` | boolean | `false` | Enable field history tracking |
|
|
26
|
+
| `enableReports` | boolean | `true` | Available in Reports |
|
|
27
|
+
| `enableSearch` | boolean | `true` | Searchable |
|
|
28
|
+
|
|
29
|
+
**Example prompts:**
|
|
30
|
+
- "Create a custom object called Project__c with plural label Projects"
|
|
31
|
+
- "Create a Job Application object with AutoNumber name format JOB-{0000}"
|
|
32
|
+
- "Create a custom object called Feedback__c with Private sharing and no activities"
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
### sf_create_custom_field
|
|
37
|
+
Creates a new field on an existing object.
|
|
38
|
+
|
|
39
|
+
**Parameters:**
|
|
40
|
+
| Parameter | Type | Description |
|
|
41
|
+
|-----------|------|-------------|
|
|
42
|
+
| `objectName` | string | Parent object API name |
|
|
43
|
+
| `fieldName` | string | Field API name ending in `__c` |
|
|
44
|
+
| `label` | string | Display label |
|
|
45
|
+
| `type` | FieldType | Text, Number, Picklist, Lookup, etc. |
|
|
46
|
+
| `required` | boolean | Is field required |
|
|
47
|
+
| `unique` | boolean | Must values be unique |
|
|
48
|
+
| `length` | number | For Text fields (1-255) |
|
|
49
|
+
| `precision` / `scale` | number | For Number/Currency fields |
|
|
50
|
+
| `picklistValues` | object | Required for Picklist/MultiselectPicklist |
|
|
51
|
+
| `referenceTo` | string | For Lookup/MasterDetail |
|
|
52
|
+
| `deleteConstraint` | string | For Lookup: Cascade/Restrict/SetNull |
|
|
53
|
+
|
|
54
|
+
**Example prompts:**
|
|
55
|
+
- "Add a Status__c picklist field to Invoice__c with values: Draft, Pending, Approved, Rejected"
|
|
56
|
+
- "Add an Amount__c currency field to Opportunity with 2 decimal places"
|
|
57
|
+
- "Add a lookup from Project__c to Account"
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### sf_describe_object
|
|
62
|
+
Reads an object's full schema via the REST Describe API — fields, types, picklist values, child relationships, and record types. Call this before querying or creating records on an unfamiliar object.
|
|
63
|
+
|
|
64
|
+
**Parameters:**
|
|
65
|
+
| Parameter | Type | Default | Description |
|
|
66
|
+
|-----------|------|---------|-------------|
|
|
67
|
+
| `objectApiName` | string | required | SObject API name, e.g. `Account` |
|
|
68
|
+
| `fieldsOnly` | boolean | `false` | Return only the field list, omitting child relationships/record types, for a smaller/faster response |
|
|
69
|
+
|
|
70
|
+
**Example prompts:**
|
|
71
|
+
- "What fields are on the Opportunity object?"
|
|
72
|
+
- "Describe the Case object schema before I query it"
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### sf_create_custom_metadata_type
|
|
77
|
+
Creates a Custom Metadata Type (__mdt) for storing configuration.
|
|
78
|
+
|
|
79
|
+
**Parameters:**
|
|
80
|
+
| Parameter | Type | Description |
|
|
81
|
+
|-----------|------|-------------|
|
|
82
|
+
| `fullName` | string | API name ending in `__mdt` |
|
|
83
|
+
| `label` | string | Singular label |
|
|
84
|
+
| `pluralLabel` | string | Plural label |
|
|
85
|
+
| `description` | string | Optional description |
|
|
86
|
+
| `fields` | array | Custom fields to add |
|
|
87
|
+
|
|
88
|
+
**Example prompts:**
|
|
89
|
+
- "Create a Feature_Flag__mdt Custom Metadata Type with a Boolean field IsEnabled__c"
|
|
90
|
+
- "Create an Integration_Config__mdt type with fields for endpoint URL and API key"
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### sf_create_apex_class
|
|
95
|
+
Deploys an Apex class to the org via Metadata API zip deploy.
|
|
96
|
+
|
|
97
|
+
**Parameters:**
|
|
98
|
+
| Parameter | Type | Description |
|
|
99
|
+
|-----------|------|-------------|
|
|
100
|
+
| `className` | string | Class name (no __c) |
|
|
101
|
+
| `classBody` | string | Full Apex source code |
|
|
102
|
+
| `apiVersion` | string | API version, default `62.0` |
|
|
103
|
+
|
|
104
|
+
**Example prompts:**
|
|
105
|
+
- "Create an Apex class called AccountService with a method to get all active accounts"
|
|
106
|
+
- "Create a Batch Apex class called DataCleanupBatch that deletes records older than 2 years"
|
|
107
|
+
- "Create a Schedulable class called NightlyReport that generates a report email"
|
|
108
|
+
|
|
109
|
+
**Expected output:** Deploy job ID and success/failure message with any compile errors.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### sf_get_apex_class
|
|
114
|
+
Reads the full source of an existing Apex class by exact name, via the Tooling API. Use before modifying a class, when debugging, or when asked to explain existing code.
|
|
115
|
+
|
|
116
|
+
**Parameters:**
|
|
117
|
+
| Parameter | Type | Description |
|
|
118
|
+
|-----------|------|-------------|
|
|
119
|
+
| `className` | string | Apex class name (exact match) |
|
|
120
|
+
|
|
121
|
+
**Example prompts:**
|
|
122
|
+
- "Show me the AccountService class"
|
|
123
|
+
- "What does the DataCleanupBatch class do?"
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### sf_get_apex_trigger
|
|
128
|
+
Reads the full source of an existing Apex trigger by exact name, including which object it fires on and which events (before/after insert/update/delete/undelete) it's registered for.
|
|
129
|
+
|
|
130
|
+
**Parameters:**
|
|
131
|
+
| Parameter | Type | Description |
|
|
132
|
+
|-----------|------|-------------|
|
|
133
|
+
| `triggerName` | string | Apex trigger name (exact match) |
|
|
134
|
+
|
|
135
|
+
**Example prompts:**
|
|
136
|
+
- "Show me the AccountTrigger source"
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### sf_enable_debug_logs / sf_get_debug_logs / sf_get_debug_log_body
|
|
141
|
+
A three-step chain for reading Apex debug logs. Salesforce only records activity for users with an active trace flag, so enable logging first, trigger the activity you want to inspect, then list and read the resulting logs.
|
|
142
|
+
|
|
143
|
+
**sf_enable_debug_logs parameters:**
|
|
144
|
+
| Parameter | Type | Default | Description |
|
|
145
|
+
|-----------|------|---------|-------------|
|
|
146
|
+
| `username` | string | required | Username of the user to trace |
|
|
147
|
+
| `durationMinutes` | number | `30` | How long tracing stays active (max 1440) |
|
|
148
|
+
| `debugLevel` | enum | `FINEST` | Apex code log granularity |
|
|
149
|
+
|
|
150
|
+
**sf_get_debug_logs parameters:** `username` (optional filter), `operation` (optional substring filter), `limit` (default 10).
|
|
151
|
+
|
|
152
|
+
**sf_get_debug_log_body parameters:** `logId` — from `sf_get_debug_logs`. Logs are retained by Salesforce for 24 hours only.
|
|
153
|
+
|
|
154
|
+
**Example prompts:**
|
|
155
|
+
- "Turn on debug logging for ajay@example.com, then run this flow and show me the log"
|
|
156
|
+
- "List the last 5 debug logs and show me the most recent one"
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### sf_execute_anonymous_apex
|
|
161
|
+
Executes Apex code immediately via Tooling API.
|
|
162
|
+
|
|
163
|
+
**Parameters:**
|
|
164
|
+
| Parameter | Type | Description |
|
|
165
|
+
|-----------|------|-------------|
|
|
166
|
+
| `apexCode` | string | Apex code to execute |
|
|
167
|
+
|
|
168
|
+
**Example prompts:**
|
|
169
|
+
- "Run this Apex to update all Contact email addresses to lowercase"
|
|
170
|
+
- "Execute: System.debug(UserInfo.getUserName());"
|
|
171
|
+
- "Run anonymous Apex to backfill the missing CreatedDate__c field on all Account records"
|
|
172
|
+
|
|
173
|
+
**Expected output:** Success/failure, compile errors if any, and debug log if present.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### sf_create_lwc
|
|
178
|
+
Deploys a Lightning Web Component via Metadata API.
|
|
179
|
+
|
|
180
|
+
**Parameters:**
|
|
181
|
+
| Parameter | Type | Description |
|
|
182
|
+
|-----------|------|-------------|
|
|
183
|
+
| `componentName` | string | camelCase name, e.g. `accountCard` |
|
|
184
|
+
| `html` | string | Full HTML template content |
|
|
185
|
+
| `javascript` | string | Full JS controller content |
|
|
186
|
+
| `css` | string | Optional CSS |
|
|
187
|
+
| `targets` | array | Where to place the component |
|
|
188
|
+
| `isExposed` | boolean | Available in App Builder |
|
|
189
|
+
| `apiVersion` | string | Default `62.0` |
|
|
190
|
+
|
|
191
|
+
**Example prompts:**
|
|
192
|
+
- "Create an LWC called opportunityList that shows a table of open opportunities"
|
|
193
|
+
- "Create a contact card LWC with name, email, phone and make it available on Record Pages"
|
|
194
|
+
- "Create an LWC Flow Screen component for collecting address information"
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
### Agentforce Tools
|
|
199
|
+
|
|
200
|
+
> **Correct creation order:** Agent → Actions → Topics (with actions listed) → Planner. The planner (`sf_create_agent_planner`) is required — without it the agent cannot route requests to any topic.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### sf_create_agent
|
|
205
|
+
Creates an Agentforce Agent (Bot shell). Follow with actions, topics, and a planner.
|
|
206
|
+
|
|
207
|
+
**Parameters:**
|
|
208
|
+
| Parameter | Type | Description |
|
|
209
|
+
|-----------|------|-------------|
|
|
210
|
+
| `agentName` | string | Agent API name |
|
|
211
|
+
| `label` | string | Display name |
|
|
212
|
+
| `description` | string | Agent description |
|
|
213
|
+
| `company` | string | Company context |
|
|
214
|
+
| `persona` | string | Agent persona description |
|
|
215
|
+
| `tone` | `Formal\|Neutral\|Casual` | Communication tone |
|
|
216
|
+
| `instructions` | string | System-level instructions |
|
|
217
|
+
|
|
218
|
+
**Example prompts:**
|
|
219
|
+
- "Create an Agentforce agent called SalesBot for helping sales reps close deals"
|
|
220
|
+
- "Create a customer service agent with a formal tone for handling support cases"
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
### sf_create_agent_action
|
|
225
|
+
Creates an Agentforce Action (GenAiFunction) linked to a Flow, Apex class, or Prompt Template. Create actions before topics — you'll need to list action names when creating topics.
|
|
226
|
+
|
|
227
|
+
**Parameters:**
|
|
228
|
+
| Parameter | Type | Description |
|
|
229
|
+
|-----------|------|-------------|
|
|
230
|
+
| `agentName` | string | Parent agent API name |
|
|
231
|
+
| `topicName` | string | Intended parent topic (for reference — pass this action's name in the topic's `actions` list) |
|
|
232
|
+
| `actionName` | string | Action API name |
|
|
233
|
+
| `label` | string | Action label |
|
|
234
|
+
| `description` | string | What this action does |
|
|
235
|
+
| `type` | string | `Flow\|ApexClass\|PromptTemplate\|DataCategoryGroup\|ExternalService` |
|
|
236
|
+
| `reference` | string | API name of the Flow/Apex/PromptTemplate to invoke |
|
|
237
|
+
| `inputs` | array | `[{name, value}]` input parameter mappings |
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
### sf_create_agent_topic
|
|
242
|
+
Creates a Topic (GenAiPlugin) that defines what requests the agent handles. Pass the action names in `actions` to link them to this topic.
|
|
243
|
+
|
|
244
|
+
**Parameters:**
|
|
245
|
+
| Parameter | Type | Description |
|
|
246
|
+
|-----------|------|-------------|
|
|
247
|
+
| `agentName` | string | Parent agent API name |
|
|
248
|
+
| `topicName` | string | Topic API name |
|
|
249
|
+
| `label` | string | Topic label |
|
|
250
|
+
| `description` | string | What this topic covers |
|
|
251
|
+
| `scope` | string | What kinds of requests it handles |
|
|
252
|
+
| `instructions` | string | Step-by-step handling instructions |
|
|
253
|
+
| `actions` | array | Action API names to wire into this topic |
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
### sf_create_agent_planner
|
|
258
|
+
**The critical wiring step.** Deploys a GenAiPlanner that connects the agent (Bot) to its topics. Without this, the agent has no routing capability and appears blank in Salesforce.
|
|
259
|
+
|
|
260
|
+
**Parameters:**
|
|
261
|
+
| Parameter | Type | Description |
|
|
262
|
+
|-----------|------|-------------|
|
|
263
|
+
| `agentName` | string | Agent API name (must match existing Bot) |
|
|
264
|
+
| `label` | string | Planner label (defaults to agentName) |
|
|
265
|
+
| `topicNames` | array | All topic API names to wire to this agent |
|
|
266
|
+
|
|
267
|
+
**Example prompts:**
|
|
268
|
+
- "Wire SalesBot to its topics: OrderManagement, CaseManagement"
|
|
269
|
+
- "Create the planner for SalesBot linking topics OrderManagement and CaseManagement"
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
### sf_deploy_metadata
|
|
274
|
+
Deploys metadata components via SOAP deploy.
|
|
275
|
+
|
|
276
|
+
**Parameters:**
|
|
277
|
+
| Parameter | Type | Description |
|
|
278
|
+
|-----------|------|-------------|
|
|
279
|
+
| `components` | array | `[{type, name}]` to deploy (optional when using `componentsXml`) |
|
|
280
|
+
| `componentsXml` | array | Inline XML components `[{type, name, xml}]` to deploy |
|
|
281
|
+
| `checkOnly` | boolean | Validate without deploying |
|
|
282
|
+
| `runTests` | array | Test classes to run |
|
|
283
|
+
| `testLevel` | string | `RunLocalTests` \| `RunAllTestsInOrg` \| `RunSpecifiedTests` \| `NoTestRun` |
|
|
284
|
+
| `rollbackOnError` | boolean | Rollback on any failure |
|
|
285
|
+
| `waitMinutes` | number | Timeout (default 10 min) |
|
|
286
|
+
|
|
287
|
+
**Example prompts:**
|
|
288
|
+
- "Deploy the AccountService Apex class and AccountTrigger to the org"
|
|
289
|
+
- "Validate the deployment of these components without making changes"
|
|
290
|
+
- "Deploy MyFlow and MyClass, running MyClassTest during deployment"
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
### sf_create_mcp_server
|
|
295
|
+
Generates a complete MCP server project on disk.
|
|
296
|
+
|
|
297
|
+
**Parameters:**
|
|
298
|
+
| Parameter | Type | Description |
|
|
299
|
+
|-----------|------|-------------|
|
|
300
|
+
| `serverName` | string | Server package name |
|
|
301
|
+
| `outputDirectory` | string | Absolute path to output directory |
|
|
302
|
+
| `description` | string | Server description |
|
|
303
|
+
| `salesforceInstanceUrl` | string | Pre-configure org URL |
|
|
304
|
+
|
|
305
|
+
**Example prompts:**
|
|
306
|
+
- "Create a new MCP server called my-sf-integration in C:/projects/my-server"
|
|
307
|
+
- "Generate a Salesforce MCP server project targeting https://myorg.salesforce.com"
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
### sf_get_field_permissions
|
|
312
|
+
Reads the current field-level security grants for a field across all Profiles and Permission Sets that reference it. Complements `sf_create_field_level_security`, which sets grants but doesn't report the current state — use this to audit access before making changes.
|
|
313
|
+
|
|
314
|
+
**Parameters:**
|
|
315
|
+
| Parameter | Type | Description |
|
|
316
|
+
|-----------|------|-------------|
|
|
317
|
+
| `objectName` | string | Object API name, e.g. `Account` |
|
|
318
|
+
| `fieldName` | string | Field API name, e.g. `Revenue__c` |
|
|
319
|
+
|
|
320
|
+
**Example prompts:**
|
|
321
|
+
- "Which profiles can edit the Revenue__c field on Opportunity?"
|
|
322
|
+
- "Audit field-level security for Account.AnnualRevenue before I change it"
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
*For the complete list of all 228 tools, see [README.md](README.md).*
|