mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 14:54:24 +01:00
fix: use pydantic Field with alias for _meta fields
Pydantic treats fields starting with underscore as private/hidden. To fix this, we need to use Field with alias='_meta' to properly handle these fields while keeping the external API unchanged. This fixes #103 where meta fields were not being properly assigned in request contexts.
This commit is contained in:
@@ -221,7 +221,7 @@ class BaseSession(
|
||||
)
|
||||
responder = RequestResponder(
|
||||
request_id=message.root.id,
|
||||
request_meta=validated_request.root.params._meta
|
||||
request_meta=validated_request.root.params.meta
|
||||
if validated_request.root.params
|
||||
else None,
|
||||
request=validated_request,
|
||||
|
||||
Reference in New Issue
Block a user