fastmcp/tests/server
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
..
http Update all tests 2025-06-27 21:41:37 -04:00
middleware Fix middleware tests 2025-06-26 18:13:32 -04:00
openapi Remove asyncio mark 2025-07-06 21:14:30 -04:00
proxy Proxy support advanced MCP features (#1022) 2025-07-04 12:21:57 -04:00
__init__.py restore 1.x code 2025-04-09 11:54:42 -04:00
test_app_state.py Update docs and test 2025-06-20 13:06:48 -04:00
test_auth_integration.py Add audio support 2025-06-14 08:59:48 -04:00
test_context.py Fix formatting per pre-commit hooks 2025-06-19 18:22:02 -04:00
test_file_server.py Remove empty parens 2025-06-04 15:37:55 -04:00
test_import_server.py Ensure multi-client configurations use new ProxyClient (#1045) 2025-07-05 11:57:03 -04:00
test_logging.py Use anyio.event 2025-05-31 18:12:17 -04:00
test_mount.py Ensure multi-client configurations use new ProxyClient (#1045) 2025-07-05 11:57:03 -04:00
test_proxy.py Proxy support advanced MCP features (#1022) 2025-07-04 12:21:57 -04:00
test_resource_prefix_formats.py Update tests 2025-06-19 14:05:19 -04:00
test_run_server.py Update tests for prompts 2025-06-04 16:37:41 -04:00
test_server.py Update all tests 2025-06-27 21:41:37 -04:00
test_server_interactions.py Fix single-element list unwrapping in tool content 2025-07-07 12:07:16 -04:00
test_tool_annotations.py Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00
test_tool_exclude_args.py Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00