Skip to content

Commit 09c9c01

Browse files
committed
fix: allow elicitations accepted without content
1 parent d1ac8d6 commit 09c9c01

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mcp/server/elicitation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ async def elicit_with_validation(
102102
# Validate and parse the content using the schema
103103
validated_data = schema.model_validate(result.content)
104104
return AcceptedElicitation(data=validated_data)
105+
elif result.action == "accept" and result.content is not None:
106+
validated_data = schema.model_validate(result.content)
107+
return AcceptedElicitation(data=validated_data)
105108
elif result.action == "decline":
106109
return DeclinedElicitation()
107110
elif result.action == "cancel":

0 commit comments

Comments
 (0)