Skip to content

Commit dd5291e

Browse files
committed
fix: set tool-status failed
1 parent 5165cc0 commit dd5291e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mcp/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ Please check the tool's input schema using ${HelperTools.ACTOR_GET_DETAILS} tool
633633
if (progressTracker) {
634634
progressTracker.stop();
635635
}
636-
636+
toolStatus = ('isError' in res && res.isError) ? 'failed' : 'succeeded';
637637
return { ...res };
638638
}
639639

@@ -646,6 +646,7 @@ Please check the tool's input schema using ${HelperTools.ACTOR_GET_DETAILS} tool
646646
Please verify the server URL is correct and accessible, and ensure you have a valid Apify token with appropriate permissions.`;
647647
log.softFail(msg, { statusCode: 408 }); // 408 Request Timeout
648648
await this.server.sendLoggingMessage({ level: 'error', data: msg });
649+
toolStatus = 'failed';
649650
return buildMCPResponse([msg], true);
650651
}
651652

0 commit comments

Comments
 (0)