[BUG] MCP tool call parameters display escaped \n and \t instead of actual line breaks

Resolved 💬 5 comments Opened Mar 6, 2026 by vittorfp Closed May 24, 2026

Description

When Claude Code displays MCP tool call parameters in the terminal (e.g. the code field of execute_script), multiline strings show \n and \t as literal escaped characters instead of rendering actual line breaks and tabs.

The tool receives the correct unescaped content and executes fine — only the terminal display is affected.

Example

A Starlark script with an embedded SQL query is displayed as:

⏺ nolo - execute_script (MCP)(code: "\nresult = bigquery_query(\n    project=\"ad-data-prod-edce\",\n    query=\"\"\"\n    SELECT\n        COUNT(*) as total_rows,\n        COUNTIF(video_title IS NULL) as null_video_title\n    FROM `my_table`\n    \"\"\",\n    limit=10\n)\nreturn result\n", timeout: 60)

Instead of rendering the code parameter with actual line breaks, making the SQL readable.

Expected behavior

Multiline string parameters in MCP tool calls should render with actual line breaks and indentation in the terminal, not as escaped JSON strings.

Environment

  • Claude Code CLI
  • macOS (Darwin 25.3.0)
  • Affects any MCP server that passes multiline strings as tool parameters

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗