Skip to content

Commit addc451

Browse files
committed
refactor: type notify as ClientNotification, remove getattr
1 parent 7fb52b4 commit addc451

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mcp/server/lowlevel/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ async def _handle_request(
510510

511511
async def _handle_notification(
512512
self,
513-
notify: Any,
513+
notify: types.ClientNotification,
514514
session: ServerSession,
515515
lifespan_context: LifespanResultT,
516516
) -> None:
@@ -530,7 +530,7 @@ async def _handle_notification(
530530
_task_support=task_support,
531531
),
532532
)
533-
await handler(ctx, getattr(notify, "params", None))
533+
await handler(ctx, notify.params)
534534
except Exception: # pragma: no cover
535535
logger.exception("Uncaught exception in notification handler")
536536

0 commit comments

Comments
 (0)