fastmcp/tests/resources
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 restore 1.x code 2025-04-09 11:54:42 -04:00
test_file_resources.py Update test typing 2025-05-31 20:41:18 -04:00
test_function_resources.py Fix single-element list unwrapping in tool content 2025-07-07 12:07:16 -04:00
test_resource_manager.py Avoid propagating logs (#1042) 2025-07-04 12:22:11 -04:00
test_resource_template.py Add automatic MCP list change notifications and client message handling 2025-06-24 22:33:06 -04:00
test_resources.py Fix field validator for resource 2025-06-10 09:43:48 -04:00