fastmcp/tests/contrib
Ankesh Kumar Thakur af557388c7
feat(contrib): auto-sync MCPMixin decorators with from_function signatures (#3323)
* feat: auto-sync MCPMixin decorators with from_function signatures

Replace hard-coded parameter lists in mcp_tool/mcp_resource/mcp_prompt
with **kwargs validated at decoration time against inspect.signature of
the underlying from_function. Registration methods now splat **kwargs
through directly, so any new from_function parameter is supported
automatically without touching the contrib module.

Also fixes enabled=False being silently ignored during registration.

🤖 Generated with Claude Code

* fix: make enabled keyword-only in mcp_tool and mcp_prompt

Prevents silent positional arg remapping — callers who previously
passed description/title as the second positional arg would have
silently bound to enabled instead.

🤖 Generated with Claude Code
2026-03-02 17:30:30 -05:00
..
__init__.py Updates based on PR Feedback 2025-04-16 23:30:09 -05:00
test_bulk_tool_caller.py optimize test suite (#1893) 2025-09-22 20:07:04 -04:00
test_component_manager.py Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
test_mcp_mixin.py feat(contrib): auto-sync MCPMixin decorators with from_function signatures (#3323) 2026-03-02 17:30:30 -05:00