powerplatform-mcp 0.3.0 → 0.4.1
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 +27 -3
- package/build/index.js +3 -3
- package/package.json +2 -2
|
@@ -80,7 +80,11 @@ 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
|
+
'LogicalName',
|
|
86
|
+
].join(',');
|
|
87
|
+
return this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/Attributes?$select=${selectProperties}&$filter=AttributeType ne 'Virtual'`);
|
|
84
88
|
}
|
|
85
89
|
/**
|
|
86
90
|
* Get metadata about a specific entity attribute/field
|
|
@@ -95,14 +99,34 @@ export class PowerPlatformService {
|
|
|
95
99
|
* @param entityName The logical name of the entity
|
|
96
100
|
*/
|
|
97
101
|
async getEntityOneToManyRelationships(entityName) {
|
|
98
|
-
|
|
102
|
+
const selectProperties = [
|
|
103
|
+
'SchemaName',
|
|
104
|
+
'RelationshipType',
|
|
105
|
+
'ReferencedAttribute',
|
|
106
|
+
'ReferencedEntity',
|
|
107
|
+
'ReferencingAttribute',
|
|
108
|
+
'ReferencingEntity',
|
|
109
|
+
'ReferencedEntityNavigationPropertyName',
|
|
110
|
+
'ReferencingEntityNavigationPropertyName'
|
|
111
|
+
].join(',');
|
|
112
|
+
return this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/OneToManyRelationships?$select=${selectProperties}`);
|
|
99
113
|
}
|
|
100
114
|
/**
|
|
101
115
|
* Get many-to-many relationships for an entity
|
|
102
116
|
* @param entityName The logical name of the entity
|
|
103
117
|
*/
|
|
104
118
|
async getEntityManyToManyRelationships(entityName) {
|
|
105
|
-
|
|
119
|
+
const selectProperties = [
|
|
120
|
+
'SchemaName',
|
|
121
|
+
'RelationshipType',
|
|
122
|
+
'Entity1LogicalName',
|
|
123
|
+
'Entity2LogicalName',
|
|
124
|
+
'Entity1IntersectAttribute',
|
|
125
|
+
'Entity2IntersectAttribute',
|
|
126
|
+
'Entity1NavigationPropertyName',
|
|
127
|
+
'Entity2NavigationPropertyName'
|
|
128
|
+
].join(',');
|
|
129
|
+
return this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/ManyToManyRelationships?$select=${selectProperties}`);
|
|
106
130
|
}
|
|
107
131
|
/**
|
|
108
132
|
* 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.1",
|
|
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",
|