Skip to content

Commit d788424

Browse files
committed
fix
1 parent 4e3c196 commit d788424

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp/server/fastmcp/utilities/func_metadata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def pre_parse_json(self, data: dict[str, Any]) -> dict[str, Any]:
8888
pre_parsed = json.loads(data[field_name])
8989
except json.JSONDecodeError:
9090
continue # Not JSON - skip
91-
if isinstance(pre_parsed, (str, int, float)):
91+
if isinstance(pre_parsed, str | int | float):
9292
# This is likely that the raw value is e.g. `"hello"` which we
9393
# Should really be parsed as '"hello"' in Python - but if we parse
9494
# it as JSON it'll turn into just 'hello'. So we skip it.

0 commit comments

Comments
 (0)