mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 13:04: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> |
||
|---|---|---|
| .. | ||
| openapi | ||
| __init__.py | ||
| test_cli.py | ||
| test_components.py | ||
| test_inspect.py | ||
| test_json_schema.py | ||
| test_json_schema_type.py | ||
| test_logging.py | ||
| test_tests.py | ||
| test_typeadapter.py | ||
| test_types.py | ||