fastmcp/tests/tools
Jeremiah Lowin 0600834da4 Fix single-element list unwrapping in tool content
Single-element lists like [1] were being incorrectly unwrapped to "1"
in unstructured content while multi-element lists remained as lists.
This created inconsistent behavior where the structure was lost for
single items.

This fix ensures lists always preserve their structure in unstructured
content regardless of length, making behavior consistent and predictable.

Also removes pretty-printing from JSON serialization for more compact
output across tools, prompts, and resources.

Fixes #1064

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 12:07:16 -04:00
..
__init__.py Support mounting FastMCPs as sub-servers 2025-04-07 17:54:55 -04:00
test_tool.py Fix single-element list unwrapping in tool content 2025-07-07 12:07:16 -04:00
test_tool_manager.py Fix single-element list unwrapping in tool content 2025-07-07 12:07:16 -04:00
test_tool_transform.py Fix single-element list unwrapping in tool content 2025-07-07 12:07:16 -04:00