skedyul 0.1.11 → 0.1.12

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.
Files changed (2) hide show
  1. package/dist/server.js +10 -8
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -431,20 +431,22 @@ function createSkedyulServer(config, registry) {
431
431
  const toolName = tool.name || toolKey;
432
432
  const inputZodSchema = getZodSchema(tool.inputs);
433
433
  const outputZodSchema = getZodSchema(tool.outputSchema);
434
- const hasOutputSchema = Boolean(outputZodSchema);
434
+ // Wrap the input schema to accept Skedyul format: { inputs: {...}, env: {...} }
435
+ // This allows the MCP SDK to pass through the wrapper without stripping fields
436
+ const wrappedInputSchema = z.object({
437
+ inputs: inputZodSchema ?? z.record(z.string(), z.unknown()).optional(),
438
+ env: z.record(z.string(), z.string()).optional(),
439
+ }).passthrough();
435
440
  mcpServer.registerTool(toolName, {
436
441
  title: toolName,
437
442
  description: tool.description,
438
- inputSchema: inputZodSchema,
443
+ inputSchema: wrappedInputSchema,
439
444
  outputSchema: outputZodSchema,
440
445
  }, async (args) => {
441
- // Support both formats:
442
- // 1. Skedyul format: { inputs: {...}, env: {...} }
443
- // 2. Standard MCP format: { ...directArgs }
446
+ // Args are in Skedyul format: { inputs: {...}, env: {...} }
444
447
  const rawArgs = args;
445
- const hasSkedyulFormat = 'inputs' in rawArgs || 'env' in rawArgs;
446
- const toolInputs = hasSkedyulFormat ? (rawArgs.inputs ?? {}) : rawArgs;
447
- const toolEnv = hasSkedyulFormat ? rawArgs.env : undefined;
448
+ const toolInputs = (rawArgs.inputs ?? {});
449
+ const toolEnv = rawArgs.env;
448
450
  const validatedInputs = inputZodSchema ? inputZodSchema.parse(toolInputs) : toolInputs;
449
451
  const result = await callTool(toolKey, {
450
452
  inputs: validatedInputs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",