powerplatform-mcp 0.4.0 → 0.4.2

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.
@@ -82,11 +82,9 @@ export class PowerPlatformService {
82
82
  async getEntityAttributes(entityName) {
83
83
  const selectProperties = [
84
84
  'AttributeType',
85
- 'EntityLogicalName',
86
85
  'LogicalName',
87
- 'SchemaName'
88
86
  ].join(',');
89
- return this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/Attributes?$select=${selectProperties}`);
87
+ return this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/Attributes?$select=${selectProperties}&$filter=AttributeType ne 'Virtual'`);
90
88
  }
91
89
  /**
92
90
  * Get metadata about a specific entity attribute/field
@@ -111,7 +109,16 @@ export class PowerPlatformService {
111
109
  'ReferencedEntityNavigationPropertyName',
112
110
  'ReferencingEntityNavigationPropertyName'
113
111
  ].join(',');
114
- return this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/OneToManyRelationships?$select=${selectProperties}`);
112
+ // Only filter by ReferencingAttribute in the OData query since startswith isn't supported
113
+ const response = await this.makeRequest(`api/data/v9.2/EntityDefinitions(LogicalName='${entityName}')/OneToManyRelationships?$select=${selectProperties}&$filter=ReferencingAttribute ne 'regardingobjectid'`);
114
+ // Filter the response to exclude relationships with ReferencingEntity starting with 'msdyn_' or 'adx_'
115
+ if (response && response.value) {
116
+ response.value = response.value.filter((relationship) => {
117
+ const referencingEntity = relationship.ReferencingEntity || '';
118
+ return !(referencingEntity.startsWith('msdyn_') || referencingEntity.startsWith('adx_'));
119
+ });
120
+ }
121
+ return response;
115
122
  }
116
123
  /**
117
124
  * Get many-to-many relationships for an entity
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerplatform-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "PowerPlatform Model Context Protocol server",
5
5
  "main": "build/index.js",
6
6
  "bin": {