@ivotoby/openapi-mcp-server 1.10.1 → 1.10.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.
package/dist/bundle.js CHANGED
@@ -18672,9 +18672,7 @@ var ApiClient = class {
18672
18672
  };
18673
18673
  }
18674
18674
  } else {
18675
- if (Object.keys(paramsCopy).length > 0) {
18676
- config.data = paramsCopy;
18677
- }
18675
+ config.data = Object.keys(paramsCopy).length > 0 ? paramsCopy : {};
18678
18676
  }
18679
18677
  const response = await this.axiosInstance(config);
18680
18678
  return response.data;
@@ -23980,6 +23978,18 @@ function loadConfig() {
23980
23978
  }
23981
23979
  const apiBaseUrl = argv["api-base-url"] || process.env.API_BASE_URL;
23982
23980
  const disableAbbreviation = argv["disable-abbreviation"] || (process.env.DISABLE_ABBREVIATION ? process.env.DISABLE_ABBREVIATION === "true" : false);
23981
+ const toolsModeInput = (typeof argv.tools === "string" ? argv.tools : void 0) || process.env.TOOLS_MODE;
23982
+ let toolsMode = "all";
23983
+ if (typeof toolsModeInput === "string" && toolsModeInput.trim().length > 0) {
23984
+ const normalized = toolsModeInput.toLowerCase();
23985
+ if (normalized === "all" || normalized === "dynamic" || normalized === "explicit") {
23986
+ toolsMode = normalized;
23987
+ } else {
23988
+ throw new Error(
23989
+ "Invalid tools mode. Expected one of: all, dynamic, explicit"
23990
+ );
23991
+ }
23992
+ }
23983
23993
  if (!apiBaseUrl) {
23984
23994
  throw new Error("API base URL is required (--api-base-url or API_BASE_URL)");
23985
23995
  }
@@ -24000,7 +24010,7 @@ function loadConfig() {
24000
24010
  includeTags: argv.tag,
24001
24011
  includeResources: argv.resource,
24002
24012
  includeOperations: argv.operation,
24003
- toolsMode: argv.tools || process.env.TOOLS_MODE || "all",
24013
+ toolsMode,
24004
24014
  disableAbbreviation: disableAbbreviation ? true : void 0
24005
24015
  };
24006
24016
  }
package/dist/cli.js CHANGED
@@ -18672,9 +18672,7 @@ var ApiClient = class {
18672
18672
  };
18673
18673
  }
18674
18674
  } else {
18675
- if (Object.keys(paramsCopy).length > 0) {
18676
- config.data = paramsCopy;
18677
- }
18675
+ config.data = Object.keys(paramsCopy).length > 0 ? paramsCopy : {};
18678
18676
  }
18679
18677
  const response = await this.axiosInstance(config);
18680
18678
  return response.data;
@@ -23980,6 +23978,18 @@ function loadConfig() {
23980
23978
  }
23981
23979
  const apiBaseUrl = argv["api-base-url"] || process.env.API_BASE_URL;
23982
23980
  const disableAbbreviation = argv["disable-abbreviation"] || (process.env.DISABLE_ABBREVIATION ? process.env.DISABLE_ABBREVIATION === "true" : false);
23981
+ const toolsModeInput = (typeof argv.tools === "string" ? argv.tools : void 0) || process.env.TOOLS_MODE;
23982
+ let toolsMode = "all";
23983
+ if (typeof toolsModeInput === "string" && toolsModeInput.trim().length > 0) {
23984
+ const normalized = toolsModeInput.toLowerCase();
23985
+ if (normalized === "all" || normalized === "dynamic" || normalized === "explicit") {
23986
+ toolsMode = normalized;
23987
+ } else {
23988
+ throw new Error(
23989
+ "Invalid tools mode. Expected one of: all, dynamic, explicit"
23990
+ );
23991
+ }
23992
+ }
23983
23993
  if (!apiBaseUrl) {
23984
23994
  throw new Error("API base URL is required (--api-base-url or API_BASE_URL)");
23985
23995
  }
@@ -24000,7 +24010,7 @@ function loadConfig() {
24000
24010
  includeTags: argv.tag,
24001
24011
  includeResources: argv.resource,
24002
24012
  includeOperations: argv.operation,
24003
- toolsMode: argv.tools || process.env.TOOLS_MODE || "all",
24013
+ toolsMode,
24004
24014
  disableAbbreviation: disableAbbreviation ? true : void 0
24005
24015
  };
24006
24016
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ivotoby/openapi-mcp-server",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
4
4
  "description": "An MCP server that exposes OpenAPI endpoints as resources",
5
5
  "license": "MIT",
6
6
  "type": "module",