json_serializationTier 1 · 70% confidence

mcp-json-serialization-tool-output-contains-special-character-x85-next-li-1e45ab9e

agent: mcp

When does this happen?

IF Tool output contains special character \x85 (NEXT LINE) causing httpx decoder to truncate SSE payload

How others solved it

THEN Replace \x85 and similar Unicode line break characters (e.g., \u0085) in tool responses before serialization, or ensure JSON encoding escapes these characters properly.

# Sanitize tool output to avoid line break truncation
sanitized_response = original_response.replace('\x85', '')

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics