GPT-4.1 Tool Response Content Format Issue

Your code, me being daft and also sending the escaping in the AI language:

  1. Price Information:
  • Current Price: $179.27
  • Price Change: +$3.76 (+2.14%)
  • Volume: 166,546,229
  1. Recent Performance:
  • 90-day High/Low: $179.89 / $104.07
  • Trend Analysis: Strong upward trend, as the current price is near the 90-day high with significant positive movement.
  1. Key Metrics Summary:
    NVIDIA (NVDA) is experiencing strong recent performance, with its stock price pushing towards new highs on elevated trading volume, reflecting robust investor sentiment and momentum.

Your code, a clean JSON:

  1. Price Information:
  • Current Price: $179.27
  • Price Change: +$3.76 (+2.14%)
  • Volume: 166,546,229
  1. Recent Performance:
  • 90-day High/Low: $179.89 / $104.07
  • Trend Analysis: NVDA is near its 90-day high, indicating strong recent upward momentum.
  1. Key Metrics Summary
  • The stock has significantly appreciated over the past quarter, showing robust trading volume and sustained bullish performance.

making it code-like and manipulable first:

import json
...
function_return_dict = {
    'ticker': 'NVDA',
    'current_price': 179.27,
    'previous_close': 175.51,
    'price_change': 3.76,
    'price_change_percent': 2.14,
    'volume': 166546229,
    'high_90d': 179.89,
    'low_90d': 104.07,
    'date': '2025-07-30',
}
function_return_string = json.dumps(function_return_dict, separators=(',', ':'))

then all of us can read the values without scrolling right.

If you are getting downright odd behavior: update the Python SDK that translates python parameters into calls.