Skip to content

MCP tool JSON serialization lacks ensure_ascii=False, degrades LLM performance for Japanese text #6995

@NTTAT-Tozuka-Takafumi

Description

@NTTAT-Tozuka-Takafumi

What happened?

Describe the bug
In the MCP tool implementation (autogen_ext/tools/mcp/_base.py), JSON serialization does not set ensure_ascii=False. This causes all non-ASCII characters, including Japanese, to be escaped as Unicode codepoints (e.g., "\u65e5\u672c"), which often degrades LLM understanding and generation quality in Japanese environments.

Which packages was the bug in?

Python Extensions (autogen-ext)

AutoGen library version.

Python dev (main branch)

Other library version.

No response

Model used

No response

Model provider

None

Other model provider

No response

Python version

None

.NET version

None

Operating system

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions