@mcp-consultant-tools/powerplatform-data 27.0.0 → 28.0.0-beta.4
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/build/index.d.ts +11 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +45 -557
- package/build/index.js.map +1 -1
- package/build/services/index.d.ts +5 -0
- package/build/services/index.d.ts.map +1 -0
- package/build/services/index.js +5 -0
- package/build/services/index.js.map +1 -0
- package/build/tools/index.d.ts +8 -0
- package/build/tools/index.d.ts.map +1 -0
- package/build/tools/index.js +11 -0
- package/build/tools/index.js.map +1 -0
- package/build/tools/read-tools.d.ts +3 -0
- package/build/tools/read-tools.d.ts.map +1 -0
- package/build/tools/read-tools.js +341 -0
- package/build/tools/read-tools.js.map +1 -0
- package/build/tools/write-tools.d.ts +3 -0
- package/build/tools/write-tools.d.ts.map +1 -0
- package/build/tools/write-tools.js +202 -0
- package/build/tools/write-tools.js.map +1 -0
- package/build/types.d.ts +13 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write tools for powerplatform-data (4 tools)
|
|
3
|
+
* Require permission flags: POWERPLATFORM_ENABLE_CREATE, _UPDATE, _DELETE, _ACTIONS.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export function registerWriteTools(server, ctx) {
|
|
7
|
+
server.tool("create-record", "Create a new record in Dataverse. Lookup fields accept both logical names (lowercase) and SchemaNames (mixed case) - the server automatically converts to the correct format. Requires POWERPLATFORM_ENABLE_CREATE=true.", {
|
|
8
|
+
entityNamePlural: z
|
|
9
|
+
.string()
|
|
10
|
+
.describe("The plural name of the entity (e.g., 'accounts', 'contacts', 'sic_applications')"),
|
|
11
|
+
data: z
|
|
12
|
+
.record(z.any())
|
|
13
|
+
.describe("Record data as JSON object. Field names must match logical names (e.g., {'name': 'Acme Corp', 'telephone1': '555-1234'}). " +
|
|
14
|
+
"For lookup fields, use '@odata.bind' syntax with either logical names or SchemaNames: {'si_titleid@odata.bind': '/si_titles(guid)'} or {'si_TitleId@odata.bind': '/si_titles(guid)'}. " +
|
|
15
|
+
"For polymorphic lookups, add entity suffix: {'si_customerid_contact@odata.bind': '/contacts(guid)'}. " +
|
|
16
|
+
"For option sets, use integer values."),
|
|
17
|
+
}, async ({ entityNamePlural, data }) => {
|
|
18
|
+
try {
|
|
19
|
+
ctx.checkCreateEnabled();
|
|
20
|
+
const service = ctx.pp;
|
|
21
|
+
const result = await service.createRecord(entityNamePlural, data);
|
|
22
|
+
return {
|
|
23
|
+
content: [
|
|
24
|
+
{
|
|
25
|
+
type: "text",
|
|
26
|
+
text: `✅ Record created successfully in ${entityNamePlural}\n\n` +
|
|
27
|
+
`**Record ID:** ${result.id || result[Object.keys(result).find(k => k.endsWith('id')) || ''] || 'N/A'}\n\n` +
|
|
28
|
+
`**Created Record:**\n\`\`\`json\n${JSON.stringify(result, null, 2)}\n\`\`\``,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
console.error("Error creating record:", error);
|
|
35
|
+
return {
|
|
36
|
+
content: [
|
|
37
|
+
{
|
|
38
|
+
type: "text",
|
|
39
|
+
text: `❌ Failed to create record: ${error.message}`,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
isError: true,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
server.tool("update-record", "Update an existing record in Dataverse. Lookup fields accept both logical names (lowercase) and SchemaNames (mixed case) - the server automatically converts to the correct format. Requires POWERPLATFORM_ENABLE_UPDATE=true.", {
|
|
47
|
+
entityNamePlural: z
|
|
48
|
+
.string()
|
|
49
|
+
.describe("The plural name of the entity (e.g., 'accounts', 'contacts', 'sic_applications')"),
|
|
50
|
+
recordId: z
|
|
51
|
+
.string()
|
|
52
|
+
.describe("The GUID of the record to update"),
|
|
53
|
+
data: z
|
|
54
|
+
.record(z.any())
|
|
55
|
+
.describe("Partial record data to update (only fields being changed). " +
|
|
56
|
+
"Field names must match logical names. " +
|
|
57
|
+
"For lookup fields, use '@odata.bind' syntax with either logical names or SchemaNames: {'si_titleid@odata.bind': '/si_titles(guid)'} or {'si_TitleId@odata.bind': '/si_titles(guid)'}. " +
|
|
58
|
+
"For option sets, use integer values."),
|
|
59
|
+
}, async ({ entityNamePlural, recordId, data }) => {
|
|
60
|
+
try {
|
|
61
|
+
ctx.checkUpdateEnabled();
|
|
62
|
+
const service = ctx.pp;
|
|
63
|
+
const result = await service.updateRecord(entityNamePlural, recordId, data);
|
|
64
|
+
return {
|
|
65
|
+
content: [
|
|
66
|
+
{
|
|
67
|
+
type: "text",
|
|
68
|
+
text: `✅ Record updated successfully in ${entityNamePlural}\n\n` +
|
|
69
|
+
`**Record ID:** ${recordId}\n\n` +
|
|
70
|
+
`**Updated Record:**\n\`\`\`json\n${JSON.stringify(result, null, 2)}\n\`\`\``,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
console.error("Error updating record:", error);
|
|
77
|
+
return {
|
|
78
|
+
content: [
|
|
79
|
+
{
|
|
80
|
+
type: "text",
|
|
81
|
+
text: `❌ Failed to update record: ${error.message}`,
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
isError: true,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
server.tool("delete-record", "Delete a record from Dataverse. Requires POWERPLATFORM_ENABLE_DELETE=true. WARNING: This operation is permanent and cannot be undone.", {
|
|
89
|
+
entityNamePlural: z
|
|
90
|
+
.string()
|
|
91
|
+
.describe("The plural name of the entity (e.g., 'accounts', 'contacts', 'sic_applications')"),
|
|
92
|
+
recordId: z
|
|
93
|
+
.string()
|
|
94
|
+
.describe("The GUID of the record to delete"),
|
|
95
|
+
confirm: z
|
|
96
|
+
.boolean()
|
|
97
|
+
.optional()
|
|
98
|
+
.describe("Confirmation flag - must be true to proceed with deletion (safety check)"),
|
|
99
|
+
}, async ({ entityNamePlural, recordId, confirm }) => {
|
|
100
|
+
try {
|
|
101
|
+
ctx.checkDeleteEnabled();
|
|
102
|
+
// Require explicit confirmation for deletion
|
|
103
|
+
if (confirm !== true) {
|
|
104
|
+
return {
|
|
105
|
+
content: [
|
|
106
|
+
{
|
|
107
|
+
type: "text",
|
|
108
|
+
text: `⚠️ Delete operation requires explicit confirmation.\n\n` +
|
|
109
|
+
`You are about to delete record **${recordId}** from **${entityNamePlural}**.\n\n` +
|
|
110
|
+
`This operation is **permanent** and **cannot be undone**.\n\n` +
|
|
111
|
+
`To proceed, call this tool again with \`confirm: true\`.`,
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const service = ctx.pp;
|
|
117
|
+
await service.deleteRecord(entityNamePlural, recordId);
|
|
118
|
+
return {
|
|
119
|
+
content: [
|
|
120
|
+
{
|
|
121
|
+
type: "text",
|
|
122
|
+
text: `✅ Record deleted successfully\n\n` +
|
|
123
|
+
`**Entity:** ${entityNamePlural}\n` +
|
|
124
|
+
`**Record ID:** ${recordId}\n\n` +
|
|
125
|
+
`⚠️ This operation is permanent.`,
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
console.error("Error deleting record:", error);
|
|
132
|
+
return {
|
|
133
|
+
content: [
|
|
134
|
+
{
|
|
135
|
+
type: "text",
|
|
136
|
+
text: `❌ Failed to delete record: ${error.message}`,
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
isError: true,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
server.tool("execute-action", "Execute a Custom API or Action in Dataverse. Supports both unbound actions (not tied to any entity) and bound actions (tied to a specific record). Requires POWERPLATFORM_ENABLE_ACTIONS=true.", {
|
|
144
|
+
actionName: z
|
|
145
|
+
.string()
|
|
146
|
+
.describe("The unique name of the Custom API or Action to execute (e.g., 'new_MyCustomAction', 'WhoAmI', 'WinOpportunity'). " +
|
|
147
|
+
"For bound actions, do NOT include the 'Microsoft.Dynamics.CRM.' prefix - it will be added automatically."),
|
|
148
|
+
parameters: z
|
|
149
|
+
.record(z.any())
|
|
150
|
+
.optional()
|
|
151
|
+
.describe("Input parameters for the action as JSON object. Parameter names and types must match the action definition. " +
|
|
152
|
+
"Example: { 'Amount': 100, 'Description': 'Test' }. Leave empty for actions with no input parameters."),
|
|
153
|
+
boundTo: z
|
|
154
|
+
.object({
|
|
155
|
+
entityNamePlural: z.string().describe("The plural name of the entity (e.g., 'opportunities', 'accounts')"),
|
|
156
|
+
recordId: z.string().describe("The GUID of the record to bind the action to"),
|
|
157
|
+
})
|
|
158
|
+
.optional()
|
|
159
|
+
.describe("For bound actions only: specify the entity and record the action is bound to. " +
|
|
160
|
+
"Leave empty for unbound actions. Example: { entityNamePlural: 'opportunities', recordId: '12345678-...' }"),
|
|
161
|
+
}, async ({ actionName, parameters, boundTo }) => {
|
|
162
|
+
try {
|
|
163
|
+
ctx.checkActionsEnabled();
|
|
164
|
+
const service = ctx.pp;
|
|
165
|
+
const result = await service.executeAction(actionName, parameters, boundTo);
|
|
166
|
+
const boundInfo = boundTo
|
|
167
|
+
? `\n**Bound To:** ${boundTo.entityNamePlural}(${boundTo.recordId})`
|
|
168
|
+
: '\n**Type:** Unbound action';
|
|
169
|
+
const paramsInfo = parameters && Object.keys(parameters).length > 0
|
|
170
|
+
? `\n**Input Parameters:**\n\`\`\`json\n${JSON.stringify(parameters, null, 2)}\n\`\`\``
|
|
171
|
+
: '';
|
|
172
|
+
const responseInfo = result && Object.keys(result).length > 0
|
|
173
|
+
? `\n**Response:**\n\`\`\`json\n${JSON.stringify(result, null, 2)}\n\`\`\``
|
|
174
|
+
: '\n**Response:** (no output parameters)';
|
|
175
|
+
return {
|
|
176
|
+
content: [
|
|
177
|
+
{
|
|
178
|
+
type: "text",
|
|
179
|
+
text: `✅ Action executed successfully\n\n` +
|
|
180
|
+
`**Action:** ${actionName}` +
|
|
181
|
+
boundInfo +
|
|
182
|
+
paramsInfo +
|
|
183
|
+
responseInfo,
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
console.error("Error executing action:", error);
|
|
190
|
+
return {
|
|
191
|
+
content: [
|
|
192
|
+
{
|
|
193
|
+
type: "text",
|
|
194
|
+
text: `❌ Failed to execute action: ${error.message}`,
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
isError: true,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=write-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-tools.js","sourceRoot":"","sources":["../../src/tools/write-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,kBAAkB,CAAC,MAAW,EAAE,GAAmB;IAEjE,MAAM,CAAC,IAAI,CACT,eAAe,EACf,0NAA0N,EAC1N;QACE,gBAAgB,EAAE,CAAC;aAChB,MAAM,EAAE;aACR,QAAQ,CAAC,kFAAkF,CAAC;QAC/F,IAAI,EAAE,CAAC;aACJ,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;aACf,QAAQ,CACP,4HAA4H;YAC5H,wLAAwL;YACxL,uGAAuG;YACvG,sCAAsC,CACvC;KACJ,EACD,KAAK,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAO,EAAE,EAAE;QACxC,IAAI,CAAC;YACH,GAAG,CAAC,kBAAkB,EAAE,CAAC;YACzB,MAAM,OAAO,GAAG,GAAG,CAAC,E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AE,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;YAChD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,+BAA+B,KAAK,CAAC,OAAO,EAAE;qBACrD;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service context shared between MCP server and CLI entry points.
|
|
3
|
+
* Uses lazy getters to initialize the PowerPlatformService on-demand.
|
|
4
|
+
*/
|
|
5
|
+
import type { PowerPlatformService } from './PowerPlatformService.js';
|
|
6
|
+
export interface ServiceContext {
|
|
7
|
+
readonly pp: PowerPlatformService;
|
|
8
|
+
checkCreateEnabled(): void;
|
|
9
|
+
checkUpdateEnabled(): void;
|
|
10
|
+
checkDeleteEnabled(): void;
|
|
11
|
+
checkActionsEnabled(): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,oBAAoB,CAAC;IAClC,kBAAkB,IAAI,IAAI,CAAC;IAC3B,kBAAkB,IAAI,IAAI,CAAC;IAC3B,kBAAkB,IAAI,IAAI,CAAC;IAC3B,mBAAmB,IAAI,IAAI,CAAC;CAC7B"}
|
package/build/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED