Skip to content

Commit c84404d

Browse files
authored
fix: preserve non-ASCII characters in JSON output
1 parent 4b81d6e commit c84404d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mcp/server/fastmcp/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,8 @@ def _convert_to_content(
552552

553553
if not isinstance(result, str):
554554
try:
555-
result = json.dumps(pydantic_core.to_jsonable_python(result), ensure_ascii=False)
555+
result = json.dumps(pydantic_core.to_jsonable_python(result)
556+
, ensure_ascii=False)
556557
except Exception:
557558
result = str(result)
558559

0 commit comments

Comments
 (0)