Description
Describe the bug
When my MCP server returns a list[dict], under normal circumstances, my client receives a list[json string], which works fine. However, when the list contains only one element, the client receives a single JSON string. This triggers unnecessary conditional checks to determine the type of the returned value, which is not elegant.
To Reproduce
Steps to reproduce the behavior:
Send request to MCP server.
Receive response containing a list[json string].
When the list has only one element, observe that the client receives a single JSON string instead of a list[json string].
Expected behavior
The client should consistently receive a list[json string], regardless of the number of elements in the list returned by the MCP server.
Screenshots
Desktop (please complete the following information):
- OS: windows11
- Browser None
- Version 22631.3593
Smartphone (please complete the following information):
Additional context