From d788424caa43599de38cee2f70233282d83e3a34 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Thu, 27 Mar 2025 16:44:44 +0000 Subject: [PATCH] fix --- src/mcp/server/fastmcp/utilities/func_metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcp/server/fastmcp/utilities/func_metadata.py b/src/mcp/server/fastmcp/utilities/func_metadata.py index 84e2382e..760fd95d 100644 --- a/src/mcp/server/fastmcp/utilities/func_metadata.py +++ b/src/mcp/server/fastmcp/utilities/func_metadata.py @@ -88,7 +88,7 @@ class FuncMetadata(BaseModel): pre_parsed = json.loads(data[field_name]) except json.JSONDecodeError: continue # Not JSON - skip - if isinstance(pre_parsed, (str, int, float)): + if isinstance(pre_parsed, str | int | float): # This is likely that the raw value is e.g. `"hello"` which we # Should really be parsed as '"hello"' in Python - but if we parse # it as JSON it'll turn into just 'hello'. So we skip it.