mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-24 06:24:18 +02:00
* Fix: Include signature modification in create_function_without_params When excluding parameters via create_function_without_params(), only __annotations__ was being updated but not __signature__. This caused Pydantic's _arguments_schema() to fail when it iterated over signature parameters that didn't exist in the type hints dictionary. The fix adds proper signature reconstruction matching the pattern used in without_injected_parameters(). Fixes KeyError: 'ctx' when using @mcp.tool() with Context parameters. * fix: add regression tests for create_function_without_params The test_pydantic_typeadapter_compatibility test specifically reproduces the issue from #2562 and verifies the fix. * fix: linter for test function --------- Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| cli | ||
| client | ||
| contrib | ||
| deprecated | ||
| experimental | ||
| integration_tests | ||
| prompts | ||
| resources | ||
| server | ||
| tools | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_examples.py | ||
| test_mcp_config.py | ||