Skip to content

Commit e6898e7

Browse files
committed
return error if tool call fails, and update package locks
1 parent 8c14b80 commit e6898e7

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

examples/servers/typescript/package-lock.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/servers/typescript/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"@modelcontextprotocol/sdk": "^1.20.1",
1919
"@types/cors": "^2.8.19",
2020
"cors": "^2.8.5",
21-
"express": "^5.1.0"
21+
"express": "^5.1.0",
22+
"zod-to-json-schema": "^3.25.0"
2223
},
2324
"devDependencies": {
2425
"tsx": "^4.7.0",

src/scenarios/server/sse-polling.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,16 +302,18 @@ export class ServerSSEPollingScenario implements ClientScenario {
302302
const parsed = JSON.parse(event.data);
303303
if (parsed.id === 1 && parsed.result) {
304304
receivedToolResponse = true;
305+
const isError = parsed.result?.isError === true;
305306
checks.push({
306307
id: 'incoming-sse-event',
307308
name: 'IncomingSseEvent',
308309
description: `Received tool response on POST stream`,
309-
status: 'INFO',
310+
status: isError ? 'FAILURE' : 'INFO',
310311
timestamp: new Date().toISOString(),
311312
details: {
312313
eventId: event.id,
313314
body: parsed
314-
}
315+
},
316+
...(isError && { errorMessage: `Tool call failed` })
315317
});
316318
}
317319
} catch {

0 commit comments

Comments
 (0)