@mithung/vunet-mcp-server 2.0.2 → 2.0.3
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/CHANGELOG.md +8 -0
- package/index.js +10 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.3] - 2026-02-13
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed metric query API endpoint to use correct VuNet path structure
|
|
12
|
+
- Changed from `/api/metrics/` to `/vuSmartMaps/api/1/bu/{buId}/metrics/`
|
|
13
|
+
- Improved error messages to include full error details for better debugging
|
|
14
|
+
- Fixed retry logic to use correct URL on re-authentication
|
|
15
|
+
|
|
8
16
|
## [2.0.1] - 2026-02-13
|
|
9
17
|
|
|
10
18
|
### Fixed
|
package/index.js
CHANGED
|
@@ -26,7 +26,7 @@ class VunetMCPServer {
|
|
|
26
26
|
this.server = new Server(
|
|
27
27
|
{
|
|
28
28
|
name: "vunet-mcp-server",
|
|
29
|
-
version: "2.0.
|
|
29
|
+
version: "2.0.3",
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
capabilities: {
|
|
@@ -221,7 +221,7 @@ class VunetMCPServer {
|
|
|
221
221
|
async queryMetric(metricName, queryParams) {
|
|
222
222
|
await this.ensureAuthenticated();
|
|
223
223
|
|
|
224
|
-
const url = `${this.normalizeTenantUrl(this.tenantUrl)}/api/metrics/${metricName}/`;
|
|
224
|
+
const url = `${this.normalizeTenantUrl(this.tenantUrl)}/vuSmartMaps/api/1/bu/${this.buId}/metrics/${metricName}/`;
|
|
225
225
|
|
|
226
226
|
try {
|
|
227
227
|
const response = await axios.get(url, {
|
|
@@ -240,7 +240,8 @@ class VunetMCPServer {
|
|
|
240
240
|
await this.ensureAuthenticated();
|
|
241
241
|
|
|
242
242
|
// Retry the request
|
|
243
|
-
const
|
|
243
|
+
const retryUrl = `${this.normalizeTenantUrl(this.tenantUrl)}/vuSmartMaps/api/1/bu/${this.buId}/metrics/${metricName}/`;
|
|
244
|
+
const retryResponse = await axios.get(retryUrl, {
|
|
244
245
|
params: queryParams,
|
|
245
246
|
headers: {
|
|
246
247
|
Authorization: `Bearer ${this.sessionToken}`,
|
|
@@ -250,8 +251,13 @@ class VunetMCPServer {
|
|
|
250
251
|
return retryResponse.data;
|
|
251
252
|
}
|
|
252
253
|
|
|
254
|
+
// Provide detailed error information
|
|
255
|
+
const errorDetails = error.response?.data
|
|
256
|
+
? JSON.stringify(error.response.data)
|
|
257
|
+
: error.message;
|
|
258
|
+
|
|
253
259
|
throw new Error(
|
|
254
|
-
`Failed to query metric '${metricName}': ${
|
|
260
|
+
`Failed to query metric '${metricName}': ${errorDetails}`
|
|
255
261
|
);
|
|
256
262
|
}
|
|
257
263
|
}
|
package/package.json
CHANGED