if tool response body is too long, will return empty #125

Open
opened 2026-02-16 00:19:59 -05:00 by yindo · 0 comments
Owner

Originally created by @sunli1223 on GitHub (May 24, 2025).

Recently, while using MCP, the process often gets interrupted when the tool returns content that is too large. After debugging, it was found that both LLM and the tool's outputs are normal, but the agent fails to receive the output.

There are similar feedbacks in the issue list,
1 https://github.com/langgenius/dify/issues/18501
2 https://github.com/langgenius/dify/issues/18501
3 https://github.com/langgenius/dify/issues/18501
but they have not been resolved. After several days of debugging, I have basically identified the cause of the problem.
the bug is in "internal/utils/http_requests/http_warpper.go", Modifying as shown in the image can fix the issue. However, I hope the official team can include this in the configuration file.

Image
Originally created by @sunli1223 on GitHub (May 24, 2025). Recently, while using MCP, the process often gets interrupted when the tool returns content that is too large. After debugging, it was found that both LLM and the tool's outputs are normal, but the agent fails to receive the output. There are similar feedbacks in the issue list, [1 https://github.com/langgenius/dify/issues/18501](https://github.com/langgenius/dify/issues/18501) [2 https://github.com/langgenius/dify/issues/18501](https://github.com/langgenius/dify/issues/18731) [3 https://github.com/langgenius/dify/issues/18501](https://github.com/langgenius/dify/issues/19978) but they have not been resolved. After several days of debugging, I have basically identified the cause of the problem. the bug is in "internal/utils/http_requests/http_warpper.go", Modifying as shown in the image can fix the issue. However, I hope the official team can include this in the configuration file. <img width="2069" alt="Image" src="https://github.com/user-attachments/assets/60e56ca2-298c-4d08-9f73-a3cefa73a89b" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#125