Closed
Description
Describe the bug
simpleStreamableHttp
The client calls the tool normally for the first time, and the second time will time out. This is because the code initialized by the client is as follows:
// src/examples/client/simpleStreamableHttp.ts#L340
const onLastEventIdUpdate = (event: string) => {
notificationsToolLastEventId = event;
};
const result = await client.request(request, CallToolResultSchema, {
resumptionToken: notificationsToolLastEventId,
onresumptiontoken: onLastEventIdUpdate
});
If the value of resumptionToken
is not empty, the GET request will be called in the StreamableHTTPClientTransport
, and the request will be replayed. This should be a scenario where the client interrupts and needs to reconnect. ResumptionToken should be configured.