Skip to content

Commit 202e922

Browse files
committed
use len of parameters to check progress variant, can't rely on clients naming params consistently
1 parent b72bbc4 commit 202e922

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp/shared/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ async def send_request(
274274
# note this is required to ensure backwards compatibility
275275
# for previous clients
276276
signature = inspect.signature(progress_callback.__call__)
277-
if "resource_uri" in signature.parameters:
277+
if len(signature.parameters) == 3:
278278
# Store the callback for this request
279279
self._resource_callbacks[request_id] = progress_callback # type: ignore
280280
else:

0 commit comments

Comments
 (0)