Commit graph

8 commits

Author SHA1 Message Date
Jeremiah Lowin
360c9c31e5
fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540)
* pin pydantic-monty to 0.0.8

* rename tool/prompt/resource base modules to avoid decorator name shadow

* add sys.modules shims for old submodule import paths

* preserve original module paths in deprecation warnings

* clarify when sys.modules shims can be removed
2026-03-17 18:11:42 -04:00
Jeremiah Lowin
b0b3a6dd95
fix: use raw strings for regex in pytest.raises match (#3523) 2026-03-15 15:14:15 -04:00
Jeremiah Lowin
d316f193a8
Fix transform arg collisions with passthrough params (#3431)
🤖 Generated with GPT-5.2-Codex
2026-03-07 11:41:07 -05:00
Jeremiah Lowin
b894a0b747
Accept callables in Tool.from_tool() (#3235)
* Accept callables in Tool.from_tool()

* chore: Update SDK documentation

* Add end-to-end client test for decorated function transform

---------

Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-02-19 11:31:13 -05:00
Jeremiah Lowin
fe57c3d689
Make $ref dereferencing optional via FastMCP(dereference_refs=...) (#3151)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-02-11 13:45:37 -05:00
Jeremiah Lowin
6a358902f2
Fix compress_schema to preserve additionalProperties: false for MCP compatibility (#3102)
Changes:
- Changed default of prune_additional_properties from True to False in compress_schema
- Added test demonstrating MCP client compatibility requirement
- Updated existing tests to explicitly enable pruning when needed
- Added additionalProperties: false to manually constructed schemas in tool_transform
- Updated inline snapshots to reflect new behavior

Fixes #3008

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
2026-02-06 18:52:21 -05:00
Jeremiah Lowin
c1f50e49be
Add enabled field to ToolTransformConfig (#2991) 2026-01-22 17:44:38 -05:00
Jeremiah Lowin
23bfdf0680
Consolidate test fixtures and refactor large test files (#2941) 2026-01-19 15:18:35 -05:00