@mcp-consultant-tools/powerplatform 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.
Files changed (65) hide show
  1. package/build/PowerPlatformService.d.ts +23 -2
  2. package/build/PowerPlatformService.d.ts.map +1 -1
  3. package/build/PowerPlatformService.js +23 -1
  4. package/build/PowerPlatformService.js.map +1 -1
  5. package/build/index.d.ts +10 -2
  6. package/build/index.d.ts.map +1 -1
  7. package/build/index.js +26 -2394
  8. package/build/index.js.map +1 -1
  9. package/build/prompts/analysis-prompts.d.ts +3 -0
  10. package/build/prompts/analysis-prompts.d.ts.map +1 -0
  11. package/build/prompts/analysis-prompts.js +286 -0
  12. package/build/prompts/analysis-prompts.js.map +1 -0
  13. package/build/prompts/entity-prompts.d.ts +3 -0
  14. package/build/prompts/entity-prompts.d.ts.map +1 -0
  15. package/build/prompts/entity-prompts.js +304 -0
  16. package/build/prompts/entity-prompts.js.map +1 -0
  17. package/build/prompts/index.d.ts +8 -0
  18. package/build/prompts/index.d.ts.map +1 -0
  19. package/build/prompts/index.js +11 -0
  20. package/build/prompts/index.js.map +1 -0
  21. package/build/services/index.d.ts +5 -0
  22. package/build/services/index.d.ts.map +1 -0
  23. package/build/services/index.js +5 -0
  24. package/build/services/index.js.map +1 -0
  25. package/build/tools/app-tools.d.ts +3 -0
  26. package/build/tools/app-tools.d.ts.map +1 -0
  27. package/build/tools/app-tools.js +126 -0
  28. package/build/tools/app-tools.js.map +1 -0
  29. package/build/tools/flow-tools.d.ts +3 -0
  30. package/build/tools/flow-tools.d.ts.map +1 -0
  31. package/build/tools/flow-tools.js +373 -0
  32. package/build/tools/flow-tools.js.map +1 -0
  33. package/build/tools/form-view-tools.d.ts +3 -0
  34. package/build/tools/form-view-tools.d.ts.map +1 -0
  35. package/build/tools/form-view-tools.js +161 -0
  36. package/build/tools/form-view-tools.js.map +1 -0
  37. package/build/tools/index.d.ts +14 -0
  38. package/build/tools/index.d.ts.map +1 -0
  39. package/build/tools/index.js +29 -0
  40. package/build/tools/index.js.map +1 -0
  41. package/build/tools/integration-tools.d.ts +3 -0
  42. package/build/tools/integration-tools.d.ts.map +1 -0
  43. package/build/tools/integration-tools.js +324 -0
  44. package/build/tools/integration-tools.js.map +1 -0
  45. package/build/tools/metadata-tools.d.ts +3 -0
  46. package/build/tools/metadata-tools.d.ts.map +1 -0
  47. package/build/tools/metadata-tools.js +165 -0
  48. package/build/tools/metadata-tools.js.map +1 -0
  49. package/build/tools/plugin-tools.d.ts +3 -0
  50. package/build/tools/plugin-tools.d.ts.map +1 -0
  51. package/build/tools/plugin-tools.js +137 -0
  52. package/build/tools/plugin-tools.js.map +1 -0
  53. package/build/tools/security-tools.d.ts +3 -0
  54. package/build/tools/security-tools.d.ts.map +1 -0
  55. package/build/tools/security-tools.js +187 -0
  56. package/build/tools/security-tools.js.map +1 -0
  57. package/build/tools/solution-tools.d.ts +3 -0
  58. package/build/tools/solution-tools.d.ts.map +1 -0
  59. package/build/tools/solution-tools.js +283 -0
  60. package/build/tools/solution-tools.js.map +1 -0
  61. package/build/types.d.ts +9 -0
  62. package/build/types.d.ts.map +1 -0
  63. package/build/types.js +2 -0
  64. package/build/types.js.map +1 -0
  65. package/package.json +1 -1
@@ -0,0 +1,304 @@
1
+ /**
2
+ * Entity Prompts - 6 prompts for entity analysis and plugin reports
3
+ */
4
+ import { z } from 'zod';
5
+ import { ENTITY_OVERVIEW, ATTRIBUTE_DETAILS, QUERY_TEMPLATE, RELATIONSHIP_MAP, } from '@mcp-consultant-tools/powerplatform-core';
6
+ function makePromptResult(text) {
7
+ return {
8
+ messages: [
9
+ {
10
+ role: "assistant",
11
+ content: { type: "text", text },
12
+ },
13
+ ],
14
+ };
15
+ }
16
+ function makePromptError(message) {
17
+ return makePromptResult(`Error: ${message}`);
18
+ }
19
+ export function registerEntityPrompts(server, ctx) {
20
+ server.prompt("entity-overview", "Get an overview of a Power Platform entity", {
21
+ entityName: z.string().describe("The logical name of the entity")
22
+ }, async (args) => {
23
+ try {
24
+ const service = ctx.pp;
25
+ const entityName = args.entityName;
26
+ const [rawMetadata, attributes] = await Promise.all([
27
+ service.getEntityMetadata(entityName),
28
+ service.getEntityAttributes(entityName)
29
+ ]);
30
+ const metadata = rawMetadata;
31
+ const entityDetails = `- Display Name: ${metadata.DisplayName?.UserLocalizedLabel?.Label || entityName}\n` +
32
+ `- Schema Name: ${metadata.SchemaName}\n` +
33
+ `- Description: ${metadata.Description?.UserLocalizedLabel?.Label || 'No description'}\n` +
34
+ `- Primary Key: ${metadata.PrimaryIdAttribute}\n` +
35
+ `- Primary Name: ${metadata.PrimaryNameAttribute}`;
36
+ const keyAttributes = attributes.value
37
+ .map((attr) => {
38
+ const attrType = attr["@odata.type"] || attr.odata?.type || "Unknown type";
39
+ return `- ${attr.LogicalName}: ${attrType}`;
40
+ })
41
+ .join('\n');
42
+ const relationships = await service.getEntityRelationships(entityName);
43
+ const oneToManyCount = relationships.oneToMany.value.length;
44
+ const manyToManyCount = relationships.manyToMany.value.length;
45
+ const relationshipsSummary = `- One-to-Many Relationships: ${oneToManyCount}\n` +
46
+ `- Many-to-Many Relationships: ${manyToManyCount}`;
47
+ let promptContent = ENTITY_OVERVIEW(entityName);
48
+ promptContent = promptContent
49
+ .replace('{{entity_details}}', entityDetails)
50
+ .replace('{{key_attributes}}', keyAttributes)
51
+ .replace('{{relationships}}', relationshipsSummary);
52
+ return makePromptResult(promptContent);
53
+ }
54
+ catch (error) {
55
+ console.error(`Error handling entity-overview prompt:`, error);
56
+ return makePromptError(error.message);
57
+ }
58
+ });
59
+ server.prompt("attribute-details", "Get detailed information about a specific entity attribute/field", {
60
+ entityName: z.string().describe("The logical name of the entity"),
61
+ attributeName: z.string().describe("The logical name of the attribute"),
62
+ }, async (args) => {
63
+ try {
64
+ const service = ctx.pp;
65
+ const { entityName, attributeName } = args;
66
+ const attribute = await service.getEntityAttribute(entityName, attributeName);
67
+ const attrDetails = `- Display Name: ${attribute.DisplayName?.UserLocalizedLabel?.Label || attributeName}\n` +
68
+ `- Description: ${attribute.Description?.UserLocalizedLabel?.Label || 'No description'}\n` +
69
+ `- Type: ${attribute.AttributeType}\n` +
70
+ `- Format: ${attribute.Format || 'N/A'}\n` +
71
+ `- Is Required: ${attribute.RequiredLevel?.Value || 'No'}\n` +
72
+ `- Is Searchable: ${attribute.IsValidForAdvancedFind || false}`;
73
+ let promptContent = ATTRIBUTE_DETAILS(entityName, attributeName);
74
+ promptContent = promptContent
75
+ .replace('{{attribute_details}}', attrDetails)
76
+ .replace('{{data_type}}', attribute.AttributeType)
77
+ .replace('{{required}}', attribute.RequiredLevel?.Value || 'No')
78
+ .replace('{{max_length}}', attribute.MaxLength || 'N/A');
79
+ return makePromptResult(promptContent);
80
+ }
81
+ catch (error) {
82
+ console.error(`Error handling attribute-details prompt:`, error);
83
+ return makePromptError(error.message);
84
+ }
85
+ });
86
+ server.prompt("query-template", "Get a template for querying a Power Platform entity", {
87
+ entityName: z.string().describe("The logical name of the entity"),
88
+ }, async (args) => {
89
+ try {
90
+ const service = ctx.pp;
91
+ const entityName = args.entityName;
92
+ const metadata = await service.getEntityMetadata(entityName);
93
+ const entityNamePlural = metadata.EntitySetName;
94
+ const attributes = await service.getEntityAttributes(entityName);
95
+ const selectFields = attributes.value
96
+ .filter((attr) => attr.IsValidForRead === true && !attr.AttributeOf)
97
+ .slice(0, 5)
98
+ .map((attr) => attr.LogicalName)
99
+ .join(',');
100
+ let promptContent = QUERY_TEMPLATE(entityNamePlural);
101
+ promptContent = promptContent
102
+ .replace('{{selected_fields}}', selectFields)
103
+ .replace('{{filter_conditions}}', `${metadata.PrimaryNameAttribute} eq 'Example'`)
104
+ .replace('{{order_by}}', `${metadata.PrimaryNameAttribute} asc`)
105
+ .replace('{{max_records}}', '50');
106
+ return makePromptResult(promptContent);
107
+ }
108
+ catch (error) {
109
+ console.error(`Error handling query-template prompt:`, error);
110
+ return makePromptError(error.message);
111
+ }
112
+ });
113
+ server.prompt("relationship-map", "Get a list of relationships for a Power Platform entity", {
114
+ entityName: z.string().describe("The logical name of the entity"),
115
+ }, async (args) => {
116
+ try {
117
+ const service = ctx.pp;
118
+ const entityName = args.entityName;
119
+ const relationships = await service.getEntityRelationships(entityName);
120
+ const oneToManyPrimary = relationships.oneToMany.value
121
+ .filter((rel) => rel.ReferencingEntity !== entityName)
122
+ .map((rel) => `- ${rel.SchemaName}: ${entityName} (1) → ${rel.ReferencingEntity} (N)`)
123
+ .join('\n');
124
+ const oneToManyRelated = relationships.oneToMany.value
125
+ .filter((rel) => rel.ReferencingEntity === entityName)
126
+ .map((rel) => `- ${rel.SchemaName}: ${rel.ReferencedEntity} (1) → ${entityName} (N)`)
127
+ .join('\n');
128
+ const manyToMany = relationships.manyToMany.value
129
+ .map((rel) => {
130
+ const otherEntity = rel.Entity1LogicalName === entityName ? rel.Entity2LogicalName : rel.Entity1LogicalName;
131
+ return `- ${rel.SchemaName}: ${entityName} (N) ↔ ${otherEntity} (N)`;
132
+ })
133
+ .join('\n');
134
+ let promptContent = RELATIONSHIP_MAP(entityName);
135
+ promptContent = promptContent
136
+ .replace('{{one_to_many_primary}}', oneToManyPrimary || 'None found')
137
+ .replace('{{one_to_many_related}}', oneToManyRelated || 'None found')
138
+ .replace('{{many_to_many}}', manyToMany || 'None found');
139
+ return makePromptResult(promptContent);
140
+ }
141
+ catch (error) {
142
+ console.error(`Error handling relationship-map prompt:`, error);
143
+ return makePromptError(error.message);
144
+ }
145
+ });
146
+ server.prompt("plugin-deployment-report", "Generate a comprehensive deployment report for a plugin assembly", {
147
+ assemblyName: z.string().describe("The name of the plugin assembly"),
148
+ }, async (args) => {
149
+ try {
150
+ const service = ctx.pp;
151
+ const result = await service.getPluginAssemblyComplete(args.assemblyName, false);
152
+ const assembly = result.assembly;
153
+ let report = `# Plugin Deployment Report: ${assembly.name}\n\n`;
154
+ report += `## Assembly Information\n`;
155
+ report += `- **Version**: ${assembly.version}\n`;
156
+ report += `- **Isolation Mode**: ${assembly.isolationmode === 2 ? 'Sandbox' : 'None'}\n`;
157
+ report += `- **Source**: ${assembly.sourcetype === 0 ? 'Database' : assembly.sourcetype === 1 ? 'Disk' : 'GAC'}\n`;
158
+ report += `- **Last Modified**: ${assembly.modifiedon} by ${assembly.modifiedby?.fullname || 'Unknown'}\n`;
159
+ report += `- **Managed**: ${assembly.ismanaged ? 'Yes' : 'No'}\n\n`;
160
+ report += `## Plugin Types (${result.pluginTypes.length} total)\n`;
161
+ result.pluginTypes.forEach((type, idx) => {
162
+ report += `${idx + 1}. ${type.typename}\n`;
163
+ });
164
+ report += `\n`;
165
+ report += `## Registered Steps (${result.steps.length} total)\n\n`;
166
+ result.steps.forEach((step) => {
167
+ const stageName = step.stage === 10 ? 'PreValidation' : step.stage === 20 ? 'PreOperation' : 'PostOperation';
168
+ const modeName = step.mode === 0 ? 'Sync' : 'Async';
169
+ const status = step.statuscode === 1 ? '✓ Enabled' : '✗ Disabled';
170
+ report += `### ${step.sdkmessageid?.name || 'Unknown'} - ${step.sdkmessagefilterid?.primaryobjecttypecode || 'None'} (${stageName}, ${modeName}, Rank ${step.rank})\n`;
171
+ report += `- **Plugin**: ${step.plugintypeid?.typename || 'Unknown'}\n`;
172
+ report += `- **Status**: ${status}\n`;
173
+ report += `- **Filtering Attributes**: ${step.filteringattributes || '(none - runs on all changes)'}\n`;
174
+ report += `- **Deployment**: ${step.supporteddeployment === 0 ? 'Server Only' : step.supporteddeployment === 1 ? 'Offline Only' : 'Both'}\n`;
175
+ if (step.images.length > 0) {
176
+ report += `- **Images**:\n`;
177
+ step.images.forEach((img) => {
178
+ const imageType = img.imagetype === 0 ? 'PreImage' : img.imagetype === 1 ? 'PostImage' : 'Both';
179
+ report += ` - ${img.name} (${imageType}) → Attributes: ${img.attributes || '(all)'}\n`;
180
+ });
181
+ }
182
+ else {
183
+ report += `- **Images**: None\n`;
184
+ }
185
+ report += `\n`;
186
+ });
187
+ report += `## Validation Results\n\n`;
188
+ if (result.validation.hasDisabledSteps) {
189
+ report += `⚠ Some steps are disabled\n`;
190
+ }
191
+ else {
192
+ report += `✓ All steps are enabled\n`;
193
+ }
194
+ if (result.validation.stepsWithoutFilteringAttributes.length > 0) {
195
+ report += `⚠ Warning: ${result.validation.stepsWithoutFilteringAttributes.length} Update/Delete steps without filtering attributes:\n`;
196
+ result.validation.stepsWithoutFilteringAttributes.forEach((name) => {
197
+ report += ` - ${name}\n`;
198
+ });
199
+ }
200
+ else {
201
+ report += `✓ All Update/Delete steps have filtering attributes\n`;
202
+ }
203
+ if (result.validation.stepsWithoutImages.length > 0) {
204
+ report += `⚠ Warning: ${result.validation.stepsWithoutImages.length} Update/Delete steps without images:\n`;
205
+ result.validation.stepsWithoutImages.forEach((name) => {
206
+ report += ` - ${name}\n`;
207
+ });
208
+ }
209
+ if (result.validation.potentialIssues.length > 0) {
210
+ report += `\n### Potential Issues\n`;
211
+ result.validation.potentialIssues.forEach((issue) => {
212
+ report += `- ${issue}\n`;
213
+ });
214
+ }
215
+ return makePromptResult(report);
216
+ }
217
+ catch (error) {
218
+ console.error(`Error generating plugin deployment report:`, error);
219
+ return makePromptError(error.message);
220
+ }
221
+ });
222
+ server.prompt("entity-plugin-pipeline-report", "Generate a visual execution pipeline showing all plugins for an entity", {
223
+ entityName: z.string().describe("The logical name of the entity"),
224
+ messageFilter: z.string().optional().describe("Optional filter by message name"),
225
+ }, async (args) => {
226
+ try {
227
+ const service = ctx.pp;
228
+ const result = await service.getEntityPluginPipeline(args.entityName, args.messageFilter, false);
229
+ let report = `# Plugin Pipeline: ${result.entity} Entity\n\n`;
230
+ if (result.steps.length === 0) {
231
+ report += `No plugins registered for this entity.\n`;
232
+ }
233
+ else {
234
+ result.messages.forEach((msg) => {
235
+ report += `## ${msg.messageName} Message\n\n`;
236
+ if (msg.stages.preValidation.length > 0) {
237
+ report += `### Stage 1: PreValidation (Synchronous)\n`;
238
+ msg.stages.preValidation.forEach((step, idx) => {
239
+ report += `${idx + 1}. **[Rank ${step.rank}]** ${step.pluginType}\n`;
240
+ report += ` - Assembly: ${step.assemblyName} v${step.assemblyVersion}\n`;
241
+ report += ` - Filtering: ${step.filteringAttributes.join(', ') || '(all columns)'}\n`;
242
+ if (step.hasPreImage || step.hasPostImage) {
243
+ const images = [];
244
+ if (step.hasPreImage)
245
+ images.push('PreImage');
246
+ if (step.hasPostImage)
247
+ images.push('PostImage');
248
+ report += ` - Images: ${images.join(', ')}\n`;
249
+ }
250
+ report += `\n`;
251
+ });
252
+ }
253
+ if (msg.stages.preOperation.length > 0) {
254
+ report += `### Stage 2: PreOperation (Synchronous)\n`;
255
+ msg.stages.preOperation.forEach((step, idx) => {
256
+ report += `${idx + 1}. **[Rank ${step.rank}]** ${step.pluginType}\n`;
257
+ report += ` - Assembly: ${step.assemblyName} v${step.assemblyVersion}\n`;
258
+ report += ` - Filtering: ${step.filteringAttributes.join(', ') || '(all columns)'}\n`;
259
+ if (step.hasPreImage || step.hasPostImage) {
260
+ const images = [];
261
+ if (step.hasPreImage)
262
+ images.push('PreImage');
263
+ if (step.hasPostImage)
264
+ images.push('PostImage');
265
+ report += ` - Images: ${images.join(', ')}\n`;
266
+ }
267
+ report += `\n`;
268
+ });
269
+ }
270
+ if (msg.stages.postOperation.length > 0) {
271
+ report += `### Stage 3: PostOperation\n`;
272
+ msg.stages.postOperation.forEach((step, idx) => {
273
+ const mode = step.modeName === 'Asynchronous' ? ' (Async)' : ' (Sync)';
274
+ report += `${idx + 1}. **[Rank ${step.rank}]** ${step.pluginType}${mode}\n`;
275
+ report += ` - Assembly: ${step.assemblyName} v${step.assemblyVersion}\n`;
276
+ report += ` - Filtering: ${step.filteringAttributes.join(', ') || '(all columns)'}\n`;
277
+ if (step.hasPreImage || step.hasPostImage) {
278
+ const images = [];
279
+ if (step.hasPreImage)
280
+ images.push('PreImage');
281
+ if (step.hasPostImage)
282
+ images.push('PostImage');
283
+ report += ` - Images: ${images.join(', ')}\n`;
284
+ }
285
+ report += `\n`;
286
+ });
287
+ }
288
+ report += `---\n\n`;
289
+ });
290
+ report += `## Execution Order\n\n`;
291
+ report += `Plugins execute in this order:\n`;
292
+ result.executionOrder.forEach((name, idx) => {
293
+ report += `${idx + 1}. ${name}\n`;
294
+ });
295
+ }
296
+ return makePromptResult(report);
297
+ }
298
+ catch (error) {
299
+ console.error(`Error generating entity plugin pipeline report:`, error);
300
+ return makePromptError(error.message);
301
+ }
302
+ });
303
+ }
304
+ //# sourceMappingURL=entity-prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-prompts.js","sourceRoot":"","sources":["../../src/prompts/entity-prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,gBAAgB,GACjB,MAAM,0CAA0C,CAAC;AAElD,SAAS,gBAAgB,CAAC,IAAY;IACpC,OAAO;QACL,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,WAAoB;gBAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE;aACzC;SACF;KACF,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,OAAe;IACtC,OAAO,gBAAgB,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAW,EAAE,GAAmB;IACpE,MAAM,CAAC,MAAM,CACX,iBAAiB,EACjB,4CAA4C,EAC5C;QACE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;KAClE,EACD,KAAK,EAAE,IAAS,EAAE,EAAE;QAClB,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YAEnC,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG,MAAM,OA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CAAC,KAAK,CAAC,iDAAiD,EAAE,KAAK,CAAC,CAAC;YACxE,OAAO,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Prompts barrel export + combined registration
3
+ */
4
+ import type { ServiceContext } from '../types.js';
5
+ export declare function registerAllPrompts(server: any, ctx: ServiceContext): void;
6
+ export { registerEntityPrompts } from './entity-prompts.js';
7
+ export { registerAnalysisPrompts } from './analysis-prompts.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAMzE;AAED,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { registerEntityPrompts } from './entity-prompts.js';
2
+ import { registerAnalysisPrompts } from './analysis-prompts.js';
3
+ export function registerAllPrompts(server, ctx) {
4
+ registerEntityPrompts(server, ctx);
5
+ registerAnalysisPrompts(server, ctx);
6
+ // 6 entity + 6 analysis = 12
7
+ console.error(`powerplatform prompts registered: 12 prompts`);
8
+ }
9
+ export { registerEntityPrompts } from './entity-prompts.js';
10
+ export { registerAnalysisPrompts } from './analysis-prompts.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,UAAU,kBAAkB,CAAC,MAAW,EAAE,GAAmB;IACjE,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,uBAAuB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAErC,6BAA6B;IAC7B,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;AAChE,CAAC;AAED,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Services barrel export
3
+ */
4
+ export { PowerPlatformService } from '../PowerPlatformService.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Services barrel export
3
+ */
4
+ export { PowerPlatformService } from '../PowerPlatformService.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ServiceContext } from '../types.js';
2
+ export declare function registerAppTools(server: any, ctx: ServiceContext): void;
3
+ //# sourceMappingURL=app-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-tools.d.ts","sourceRoot":"","sources":["../../src/tools/app-tools.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAoJvE"}
@@ -0,0 +1,126 @@
1
+ /**
2
+ * App Tools - 4 tools for model-driven app inspection
3
+ */
4
+ import { z } from 'zod';
5
+ export function registerAppTools(server, ctx) {
6
+ server.tool("get-apps", "Get all model-driven apps in the PowerPlatform environment", {
7
+ activeOnly: z.boolean().optional().describe("Only return active apps (default: false)"),
8
+ maxRecords: z.number().optional().describe("Maximum number of apps to return (default: 100)"),
9
+ includeUnpublished: z.boolean().optional().describe("Include unpublished/draft apps (default: true)"),
10
+ solutionUniqueName: z.string().optional().describe("Filter apps by solution unique name (e.g., 'MCPTestCore')"),
11
+ }, async ({ activeOnly, maxRecords, includeUnpublished, solutionUniqueName }) => {
12
+ try {
13
+ const service = ctx.pp;
14
+ const result = await service.getApps(activeOnly || false, maxRecords || 100, includeUnpublished !== undefined ? includeUnpublished : true, solutionUniqueName);
15
+ const resultStr = JSON.stringify(result, null, 2);
16
+ return {
17
+ content: [
18
+ {
19
+ type: "text",
20
+ text: `Model-Driven Apps (found ${result.totalCount}):\n\n${resultStr}`,
21
+ },
22
+ ],
23
+ };
24
+ }
25
+ catch (error) {
26
+ console.error("Error getting apps:", error);
27
+ return {
28
+ content: [
29
+ {
30
+ type: "text",
31
+ text: `Failed to get apps: ${error.message}`,
32
+ },
33
+ ],
34
+ isError: true
35
+ };
36
+ }
37
+ });
38
+ server.tool("get-app", "Get detailed information about a specific model-driven app", {
39
+ appId: z.string().describe("The GUID of the app (appmoduleid)"),
40
+ }, async ({ appId }) => {
41
+ try {
42
+ const service = ctx.pp;
43
+ const result = await service.getApp(appId);
44
+ const resultStr = JSON.stringify(result, null, 2);
45
+ return {
46
+ content: [
47
+ {
48
+ type: "text",
49
+ text: `Model-Driven App '${result.name}':\n\n${resultStr}`,
50
+ },
51
+ ],
52
+ };
53
+ }
54
+ catch (error) {
55
+ console.error("Error getting app:", error);
56
+ return {
57
+ content: [
58
+ {
59
+ type: "text",
60
+ text: `Failed to get app: ${error.message}`,
61
+ },
62
+ ],
63
+ isError: true
64
+ };
65
+ }
66
+ });
67
+ server.tool("get-app-components", "Get all components (entities, forms, views, sitemaps) in a model-driven app", {
68
+ appId: z.string().describe("The GUID of the app (appmoduleid)"),
69
+ }, async ({ appId }) => {
70
+ try {
71
+ const service = ctx.pp;
72
+ const result = await service.getAppComponents(appId);
73
+ const resultStr = JSON.stringify(result, null, 2);
74
+ return {
75
+ content: [
76
+ {
77
+ type: "text",
78
+ text: `App Components (found ${result.totalCount}):\n\n${resultStr}`,
79
+ },
80
+ ],
81
+ };
82
+ }
83
+ catch (error) {
84
+ console.error("Error getting app components:", error);
85
+ return {
86
+ content: [
87
+ {
88
+ type: "text",
89
+ text: `Failed to get app components: ${error.message}`,
90
+ },
91
+ ],
92
+ isError: true
93
+ };
94
+ }
95
+ });
96
+ server.tool("get-app-sitemap", "Get the sitemap (navigation) configuration for a model-driven app", {
97
+ appId: z.string().describe("The GUID of the app (appmoduleid)"),
98
+ }, async ({ appId }) => {
99
+ try {
100
+ const service = ctx.pp;
101
+ const result = await service.getAppSitemap(appId);
102
+ const resultStr = JSON.stringify(result, null, 2);
103
+ return {
104
+ content: [
105
+ {
106
+ type: "text",
107
+ text: `App Sitemap:\n\n${resultStr}`,
108
+ },
109
+ ],
110
+ };
111
+ }
112
+ catch (error) {
113
+ console.error("Error getting app sitemap:", error);
114
+ return {
115
+ content: [
116
+ {
117
+ type: "text",
118
+ text: `Failed to get app sitemap: ${error.message}`,
119
+ },
120
+ ],
121
+ isError: true
122
+ };
123
+ }
124
+ });
125
+ }
126
+ //# sourceMappingURL=app-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-tools.js","sourceRoot":"","sources":["../../src/tools/app-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,gBAAgB,CAAC,MAAW,EAAE,GAAmB;IAC/D,MAAM,CAAC,IAAI,CACT,UAAU,EACV,4DAA4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E,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,8BAA8B,KAAK,CAAC,OAAO,EAAE;qBACpD;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ServiceContext } from '../types.js';
2
+ export declare function registerFlowTools(server: any, ctx: ServiceContext): void;
3
+ //# sourceMappingURL=flow-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow-tools.d.ts","sourceRoot":"","sources":["../../src/tools/flow-tools.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CA8axE"}