keryx 0.15.1 → 0.15.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.
@@ -373,9 +373,9 @@ function createMcpServer(): McpServer {
373
373
  toolConfig.description = action.description;
374
374
  }
375
375
 
376
- if (action.inputs) {
377
- toolConfig.inputSchema = sanitizeSchemaForMcp(action.inputs);
378
- }
376
+ toolConfig.inputSchema = action.inputs
377
+ ? sanitizeSchemaForMcp(action.inputs)
378
+ : z4mini.strictObject({});
379
379
 
380
380
  mcpServer.registerTool(
381
381
  toolName,
@@ -601,6 +601,12 @@ function sanitizeSchemaForMcp(schema: any): any {
601
601
  return schema;
602
602
  }
603
603
 
604
+ // Empty object schemas should use strictObject to produce
605
+ // { type: "object", additionalProperties: false } per MCP spec
606
+ if (Object.entries(schema.shape as Record<string, any>).length === 0) {
607
+ return z4mini.strictObject({});
608
+ }
609
+
604
610
  const newShape: Record<string, any> = {};
605
611
  let needsSanitization = false;
606
612
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keryx",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "license": "MIT",