Skip to content

Commit 14785bb

Browse files
committed
fix: allow elicitations accepted without content
1 parent d1ac8d6 commit 14785bb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mcp/server/elicitation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ 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+
if result.action == "accept":
106+
# Validate the empty result
107+
validated_data = schema.model_validate({})
108+
return AcceptedElicitation(data=validated_data)
105109
elif result.action == "decline":
106110
return DeclinedElicitation()
107111
elif result.action == "cancel":

0 commit comments

Comments
 (0)