powerplatform-mcp 0.3.0 → 0.4.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/build/PowerPlatformService.js +29 -3
- package/build/index.js +3 -3
- package/package.json +2 -2
|
@@ -80,7 +80,13 @@ export class PowerPlatformService {
|
|
|
80
80
|
* @param entityName The logical name of the entity
|
|
81
81
|
*/
|
|
82
82
|
async getEntityAttributes(entityName) {
|
|
83
|
-
|
|
83
|
+
const selectProperties = [
|
|
84
|
+
'AttributeType',
|
|
85
|
+
'EntityLogicalName',
|
|
86
|
+
'LogicalName',
|
|
87
|
+
'SchemaName'
|
|
88
|
+
].join(',');
|
|
89
|
+
return this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/Attributes?$select=${selectProperties}`);
|
|
84
90
|
}
|
|
85
91
|
/**
|
|
86
92
|
* Get metadata about a specific entity attribute/field
|
|
@@ -95,14 +101,34 @@ export class PowerPlatformService {
|
|
|
95
101
|
* @param entityName The logical name of the entity
|
|
96
102
|
*/
|
|
97
103
|
async getEntityOneToManyRelationships(entityName) {
|
|
98
|
-
|
|
104
|
+
const selectProperties = [
|
|
105
|
+
'SchemaName',
|
|
106
|
+
'RelationshipType',
|
|
107
|
+
'ReferencedAttribute',
|
|
108
|
+
'ReferencedEntity',
|
|
109
|
+
'ReferencingAttribute',
|
|
110
|
+
'ReferencingEntity',
|
|
111
|
+
'ReferencedEntityNavigationPropertyName',
|
|
112
|
+
'ReferencingEntityNavigationPropertyName'
|
|
113
|
+
].join(',');
|
|
114
|
+
return this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/OneToManyRelationships?$select=${selectProperties}`);
|
|
99
115
|
}
|
|
100
116
|
/**
|
|
101
117
|
* Get many-to-many relationships for an entity
|
|
102
118
|
* @param entityName The logical name of the entity
|
|
103
119
|
*/
|
|
104
120
|
async getEntityManyToManyRelationships(entityName) {
|
|
105
|
-
|
|
121
|
+
const selectProperties = [
|
|
122
|
+
'SchemaName',
|
|
123
|
+
'RelationshipType',
|
|
124
|
+
'Entity1LogicalName',
|
|
125
|
+
'Entity2LogicalName',
|
|
126
|
+
'Entity1IntersectAttribute',
|
|
127
|
+
'Entity2IntersectAttribute',
|
|
128
|
+
'Entity1NavigationPropertyName',
|
|
129
|
+
'Entity2NavigationPropertyName'
|
|
130
|
+
].join(',');
|
|
131
|
+
return this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/ManyToManyRelationships?$select=${selectProperties}`);
|
|
106
132
|
}
|
|
107
133
|
/**
|
|
108
134
|
* Get all relationships (one-to-many and many-to-many) for an entity
|
package/build/index.js
CHANGED
|
@@ -42,7 +42,7 @@ function getPowerPlatformService() {
|
|
|
42
42
|
// Pre-defined PowerPlatform Prompts
|
|
43
43
|
const powerPlatformPrompts = {
|
|
44
44
|
// Entity exploration prompts
|
|
45
|
-
ENTITY_OVERVIEW: (entityName) => `##
|
|
45
|
+
ENTITY_OVERVIEW: (entityName) => `## Power Platform Entity: ${entityName}\n\n` +
|
|
46
46
|
`This is an overview of the '${entityName}' entity in Microsoft Power Platform/Dataverse:\n\n` +
|
|
47
47
|
`### Entity Details\n{{entity_details}}\n\n` +
|
|
48
48
|
`### Attributes\n{{key_attributes}}\n\n` +
|
|
@@ -73,7 +73,7 @@ const powerPlatformPrompts = {
|
|
|
73
73
|
};
|
|
74
74
|
// Register prompts with the server using the correct method signature
|
|
75
75
|
// Entity Overview Prompt
|
|
76
|
-
server.prompt("entity-overview", "Get an overview of a
|
|
76
|
+
server.prompt("entity-overview", "Get an overview of a Power Platform entity", {
|
|
77
77
|
entityName: z.string().describe("The logical name of the entity")
|
|
78
78
|
}, async (args) => {
|
|
79
79
|
try {
|
|
@@ -184,7 +184,7 @@ server.prompt("attribute-details", "Get detailed information about a specific en
|
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
// Query Template Prompt
|
|
187
|
-
server.prompt("query-template", "Get a template for querying a
|
|
187
|
+
server.prompt("query-template", "Get a template for querying a Power Platform entity", {
|
|
188
188
|
entityName: z.string().describe("The logical name of the entity"),
|
|
189
189
|
}, async (args) => {
|
|
190
190
|
try {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerplatform-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "PowerPlatform Model Context Protocol server",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"powerplatform-mcp": "
|
|
7
|
+
"powerplatform-mcp": "build/index.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc",
|