fix: skip validation if tool reports error

This commit is contained in:
joeyzzeng 2025-06-18 21:34:42 +08:00
commit e76faf6a18

View file

@ -200,7 +200,7 @@ export class McpServer {
}
}
if (tool.outputSchema) {
if (tool.outputSchema && (result.isError !== true)) {
if (!result.structuredContent) {
throw new McpError(
ErrorCode.InvalidParams,