We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e3c196 commit d788424Copy full SHA for d788424
src/mcp/server/fastmcp/utilities/func_metadata.py
@@ -88,7 +88,7 @@ def pre_parse_json(self, data: dict[str, Any]) -> dict[str, Any]:
88
pre_parsed = json.loads(data[field_name])
89
except json.JSONDecodeError:
90
continue # Not JSON - skip
91
- if isinstance(pre_parsed, (str, int, float)):
+ if isinstance(pre_parsed, str | int | float):
92
# This is likely that the raw value is e.g. `"hello"` which we
93
# Should really be parsed as '"hello"' in Python - but if we parse
94
# it as JSON it'll turn into just 'hello'. So we skip it.
0 commit comments