fastmcp/tests/client
Chris Guidry f2006804d2 fix: prompt tasks returning mcp.types.PromptMessage now work
When a prompt function returned `mcp.types.PromptMessage` objects directly
and was executed as a task, the result serialization failed with
"'PromptMessage' object has no attribute 'to_mcp'".

The task result converter was calling `.to_mcp()` on what it thought was a
FastMCP wrapper type, but the import actually pulls in `mcp.types.PromptMessage`
directly, which is already the final MCP type. Removed the unnecessary
conversion.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 12:57:04 -05:00
..
auth Fix OAuth client to preserve full URL path for metadata discovery (#2577) 2025-12-09 09:47:07 -05:00
tasks fix: prompt tasks returning mcp.types.PromptMessage now work 2025-12-12 12:57:04 -05:00
transports Fix type errors for ty 0.0.1-alpha.31 upgrade (#2561) 2025-12-05 21:29:14 -05:00
__init__.py clean up test inits 2025-05-31 19:32:08 -04:00
test_client.py Remove enable_tasks setting, enable task protocol by default 2025-12-09 09:34:42 -05:00
test_elicitation.py SEP-1330 enum schema support (#2549) 2025-12-09 12:22:30 -05:00
test_logs.py Fix log handler to accept any JSON-serializable data type (#2102) 2025-10-15 10:20:04 -07:00
test_notifications.py Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00
test_oauth_callback_xss.py Escape all HTML to prevent XSS attack (#2090) 2025-10-14 12:30:21 -07:00
test_openapi.py Switch to new OpenAPI parser as default (#2513) 2025-12-01 20:29:18 -05:00
test_progress.py Remove empty parens 2025-06-04 15:37:55 -04:00
test_roots.py Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00
test_sampling.py Update FastMCP for MCP SDK 1.23.1 auth changes 2025-12-03 11:50:08 -05:00
test_sse.py 2.14 deprecation removals (#2329) 2025-12-01 14:11:00 -05:00
test_stdio.py feat: expose errlog on stdio transport (#1991) 2025-10-11 18:33:06 -04:00
test_streamable_http.py Expose get_session_id callback (#2486) 2025-12-09 12:24:11 -05:00