Skip to content

Commit 7e78ba0

Browse files
committed
address comments #352
1 parent 39d231e commit 7e78ba0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mcp/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func toolForErr[In, Out any](t *Tool, h ToolHandlerFor[In, Out]) (*Tool, ToolHan
264264
// Skip if out is nil: we've removed "null" from the output schema, so nil won't validate.
265265
if v := reflect.ValueOf(out); v.Kind() == reflect.Pointer && v.IsNil() {
266266
} else if err := validateSchema(outputResolved, &out); err != nil {
267-
return nil, err
267+
return nil, fmt.Errorf("tool output: %w", err)
268268
}
269269

270270
// TODO: return the serialized JSON in a TextContent block, as per spec?

0 commit comments

Comments
 (0)