vpsnet-mcp 2.6.0 → 2.7.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.
@@ -1,4 +1,10 @@
1
+ import { z } from 'zod';
1
2
  import { ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
3
+ /** Zod 3 int() accepted every finite integral number; v4 int() adds safe bounds.
4
+ * Retain the existing input range where the contract never specified safe(). */
5
+ export function unboundedInteger() {
6
+ return z.number().refine(Number.isInteger, "Expected integer").meta({ type: "integer" });
7
+ }
2
8
  const MAX_DEPTH = 128;
3
9
  const MAX_NODES = 100_000;
4
10
  const annotations = new Set(['title', 'description', 'default', 'examples', '$comment']);
@@ -6,7 +12,7 @@ const schemaMaps = new Set(['properties', 'patternProperties', '$defs', 'definit
6
12
  const schemaArrays = new Set(['allOf', 'anyOf', 'oneOf', 'prefixItems']);
7
13
  const childSchemas = new Set(['items', 'additionalItems', 'additionalProperties', 'unevaluatedItems', 'unevaluatedProperties', 'propertyNames', 'contains', 'not', 'if', 'then', 'else', 'contentSchema']);
8
14
  /** Inline only references within this input schema, without changing validation. */
9
- export function inlineToolInputSchema(schema) {
15
+ export function inlineToolInputSchema(schema, preserveClosedObjects = false) {
10
16
  let remaining = MAX_NODES;
11
17
  function child(key, value, depth, ancestors) {
12
18
  if (schemaMaps.has(key) && value !== null && typeof value === 'object' && !Array.isArray(value)) {
@@ -67,8 +73,15 @@ export function inlineToolInputSchema(schema) {
67
73
  return Object.keys(siblings).length ? { allOf: [expanded, siblings] } : expanded;
68
74
  }
69
75
  }
70
- return Object.fromEntries(Object.entries(object)
76
+ const result = Object.fromEntries(Object.entries(object)
71
77
  .map(([key, item]) => [key, child(key, item, depth + 1, ancestors)]));
78
+ // v3 advertised strip-mode objects as closed. Preserve the published input
79
+ // contract; explicit catchalls and empty argument schemas stay untouched.
80
+ if (preserveClosedObjects && result.type === 'object' && result.properties
81
+ && Object.keys(result.properties).length && result.additionalProperties === undefined) {
82
+ result.additionalProperties = false;
83
+ }
84
+ return result;
72
85
  }
73
86
  return visit(schema, 0, new Set());
74
87
  }
@@ -81,7 +94,7 @@ export function installToolInputSchemas(server) {
81
94
  return original(schema, async (...args) => {
82
95
  const response = await handler(...args);
83
96
  return { ...response, tools: response.tools.map((tool) => ({
84
- ...tool, inputSchema: inlineToolInputSchema(tool.inputSchema),
97
+ ...tool, inputSchema: inlineToolInputSchema(tool.inputSchema, true),
85
98
  })) };
86
99
  });
87
100
  });
@@ -90,7 +90,7 @@ export const updateInfoOutput = {
90
90
  compatibility: z.object({ status: z.literal('unknown'), reason: z.string() }),
91
91
  distribution_status: z.object({ source_release_published: z.boolean().nullable(), npm_package_published: z.boolean().nullable(),
92
92
  remote_deployment_status: z.literal('unknown'), official_registry: z.object({ status: z.literal('unknown'), version: z.null(), checked_at: z.null() }),
93
- downstream_catalogs: z.record(z.unknown()),
93
+ downstream_catalogs: z.record(z.string(), z.unknown()),
94
94
  }),
95
95
  instructions: z.object({ reviewed_at: z.string(), source_urls: z.array(z.string()), steps: z.array(z.string()) }).nullable(),
96
96
  server_update: z.string(), advisory: z.literal(true), reason: z.string().nullable(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpsnet-mcp",
3
- "version": "2.6.0",
3
+ "version": "2.7.1",
4
4
  "type": "module",
5
5
  "description": "MCP server for managing VPSnet.com services, applications, DNS, domains, billing, and server lifecycle operations",
6
6
  "bin": {
@@ -38,6 +38,7 @@
38
38
  "build/remote.js",
39
39
  "build/http-server.js",
40
40
  "build/request-context.js",
41
+ "build/tool-annotations.js",
41
42
  "build/remote-policy.js",
42
43
  "build/scope-catalog.js",
43
44
  "build/remote-auth-error.js",
@@ -70,7 +71,7 @@
70
71
  },
71
72
  "dependencies": {
72
73
  "@modelcontextprotocol/sdk": "^1.32.1",
73
- "zod": "^3.24.2"
74
+ "zod": "4.6.7"
74
75
  },
75
76
  "devDependencies": {
76
77
  "@types/node": "^22.13.1",