You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, my MCP is a StreamableHttp, and the tool is text2image, which returns an image containing base64 in JSON. When I called the tool, I got an error: An error occurred while running the tool. Please try again. Error: Error code: 400 - {'error': {'code': 'invalid_parameter_error', 'param': None, 'message': '<400> InternalError.Algo.InvalidParameter: Range of input length should be [1, 129024]', 'type': 'invalid_request_error'}, 'id': 'chatcmpl-049fe5e6-3977-929d-b1ad-1b069f5980b5', 'request_id': '049fe5e6-3977-929d-b1ad-1b069f5980b5'}, After my investigation, I found that the error occurred in the _get_new_response() function. How should I preprocess my JSON before passing it as a parameter to this function, such as saving the file locally and modifying the JSON to a regular short string.