tools icon indicating copy to clipboard operation
tools copied to clipboard

Add a way to retrieve the ID for a given request

Open jakemac53 opened this issue 8 months ago • 0 comments

This is a blocker for https://github.com/dart-lang/ai/issues/37

Cancellation notifications are by ID but we don't get direct access to the ID (see the MCP spec).

We could hack this by passing a custom ID generator, but it would require relying on implementation details to avoid race conditions (relying on the id function being called synchronously when we call sendRequest).

It isn't obvious how best to expose this - possibly it could be via an Expando on the returned Future from sendRequest.

jakemac53 avatar May 02 '25 18:05 jakemac53