fastmcp/tests
Jeremiah Lowin edb9d5ab65
Refactor prompt behavior and add meta support (#2600)
* feat: add PromptResult as canonical internal type for prompts

Applies the same pattern as ResourceContent to prompts. PromptResult
wraps messages with description and meta. Public render() can return
either list[PromptMessage] or PromptResult (backwards compatible),
while private _render() always returns PromptResult.

* docs: fix incorrect PromptResult return type in example

* feat: add PromptResult canonical type with meta support

* fix: address PR #2600 review comments

Fixes test failures and code quality issues identified in PR review:

- Update 3 tests in test_server_interactions.py to access PromptResult.messages[0] instead of indexing directly
- Fix ProxyPromptManager to preserve meta field when converting GetPromptResult to PromptResult
- Fix ProxyPrompt.render() to return PromptResult instead of deprecated list[PromptMessage], preventing fastmcp tags from leaking into runtime meta
- Fix mask_error_details initialization to respect explicit False values
- Fix exception re-raising to preserve tracebacks (use bare raise instead of raise e)
- Update testing documentation to use pytest -n auto for parallel execution
2025-12-13 12:08:41 -05:00
..
cli Remove enable_docket setting; Docket is now always on 2025-12-05 11:40:04 -05:00
client fix: prompt tasks returning mcp.types.PromptMessage now work 2025-12-12 12:57:04 -05:00
contrib feat: Add title, annotations and meta to mixin decorators 2025-10-10 14:23:02 +05:30
deprecated Remove deprecated mount/import argument order and separator params (#2582) 2025-12-09 13:58:51 -05:00
experimental Switch to new OpenAPI parser as default (#2513) 2025-12-01 20:29:18 -05:00
integration_tests Improve rate limit detection for integration tests 2025-12-04 11:52:40 -05:00
prompts Refactor prompt behavior and add meta support (#2600) 2025-12-13 12:08:41 -05:00
resources Refactor resource behavior and add meta support (#2598) 2025-12-13 11:45:38 -05:00
server Refactor prompt behavior and add meta support (#2600) 2025-12-13 12:08:41 -05:00
tools Add execution field to base Tool class 2025-12-08 17:07:49 -05:00
utilities Fix: Include signature modification in create_function_without_params (#2563) 2025-12-06 11:57:36 -05:00
__init__.py Update type handling for resources 2024-11-29 19:42:46 -05:00
conftest.py fix: skip wait_closed() on Windows to avoid socket shutdown hang 2025-12-05 12:30:27 -05:00
test_mcp_config.py Bump ty to ==0.0.1a25 (#2350) 2025-11-02 20:02:45 -05:00