Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Fix syntax issue prior to 3.12

Jeremiah Lowin063c63f5904c
diff --git a/src/fastmcp/server/context.py b/src/fastmcp/server/context.py
index a37e8c927..fc7fa0c6c 100644
--- a/src/fastmcp/server/context.py
+++ b/src/fastmcp/server/context.py
@@ -347,7 +347,7 @@ class Context:
f"{response_type}"
)
# Convert list of options to Literal type and wrap
- choice_literal = Literal[*tuple(response_type)] # type: ignore
+ choice_literal = Literal[tuple(response_type)] # type: ignore
response_type = ScalarElicitationType[choice_literal] # type: ignore
# if the user provided a primitive scalar, wrap it in an object schema
elif response_type in {bool, int, float, str}: