skedyul 1.0.22 → 1.0.23
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/.build-stamp +1 -1
- package/dist/server/index.js +4 -2
- package/dist/server/serverless.js +3 -1
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1773979023721
|
package/dist/server/index.js
CHANGED
|
@@ -191,11 +191,14 @@ function createSkedyulServer(config, registry, webhookRegistry) {
|
|
|
191
191
|
invocation: toolInvocation,
|
|
192
192
|
});
|
|
193
193
|
// Handle error case
|
|
194
|
+
const hasOutputSchema = Boolean(outputZodSchema);
|
|
194
195
|
if (result.error) {
|
|
195
196
|
const errorOutput = { error: result.error };
|
|
196
197
|
return {
|
|
197
198
|
content: [{ type: 'text', text: JSON.stringify(errorOutput) }],
|
|
198
|
-
structuredContent
|
|
199
|
+
// Don't provide structuredContent for error responses when tool has outputSchema
|
|
200
|
+
// because the error response won't match the success schema and MCP SDK validates it
|
|
201
|
+
structuredContent: hasOutputSchema ? undefined : errorOutput,
|
|
199
202
|
isError: true,
|
|
200
203
|
billing: result.billing,
|
|
201
204
|
};
|
|
@@ -204,7 +207,6 @@ function createSkedyulServer(config, registry, webhookRegistry) {
|
|
|
204
207
|
// Note: effect is embedded in structuredContent because the MCP SDK
|
|
205
208
|
// transport strips custom top-level fields in dedicated mode
|
|
206
209
|
const outputData = result.output;
|
|
207
|
-
const hasOutputSchema = Boolean(outputZodSchema);
|
|
208
210
|
// MCP SDK requires structuredContent when outputSchema is defined
|
|
209
211
|
// Always provide it (even as empty object) to satisfy validation
|
|
210
212
|
let structuredContent;
|
|
@@ -633,7 +633,9 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
|
|
|
633
633
|
const errorOutput = { error: toolResult.error };
|
|
634
634
|
result = {
|
|
635
635
|
content: [{ type: 'text', text: JSON.stringify(errorOutput) }],
|
|
636
|
-
structuredContent
|
|
636
|
+
// Don't provide structuredContent for error responses when tool has outputSchema
|
|
637
|
+
// because the error response won't match the success schema and MCP SDK validates it
|
|
638
|
+
structuredContent: hasOutputSchema ? undefined : errorOutput,
|
|
637
639
|
isError: true,
|
|
638
640
|
billing: toolResult.billing,
|
|
639
641
|
};
|