Commit graph

37 commits

Author SHA1 Message Date
Jeremiah Lowin
d8ab493664
Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
Jeremiah Lowin
84d7d3b281 Support plural names/keys in enable/disable API
Change enable() and disable() to accept sets: names, keys, tags.
Use key-based disable for decorator enabled=False to scope exactly.
2026-01-18 14:58:29 -05:00
Jeremiah Lowin
50ba6ea5a4 Refactor visibility to mark-based enabled system
Rename Visibility to Enabled, collapse VisibilityRule into the transform,
and move enabled filtering from Provider to Server level so server-level
transforms can override provider-level disables.
2026-01-18 14:36:33 -05:00
Jeremiah Lowin
6ba5e5d194 Fix type errors and add type ignore comments
- Add None checks in auth and tool transform tests
- Add assertions in component_service.py for None returns
- Add type ignore comments for max() with version_sort_key
2026-01-17 07:23:29 -05:00
Jeremiah Lowin
a6cd764b5f
Add component versioning and VersionFilter transform (#2894) 2026-01-16 20:53:18 -05:00
Jeremiah Lowin
1b723f302d
Decorators return functions instead of component objects (#2856) 2026-01-12 21:58:07 -05:00
Jeremiah Lowin
627c6cdad4
Dereference $ref in tool schemas for MCP client compatibility (#2808) 2026-01-07 18:30:08 -05:00
Jeremiah Lowin
7a1796fbdf
Add VisibilityFilter for hierarchical enable/disable (#2708) 2025-12-24 14:43:41 -05:00
Jeremiah Lowin
049bd22827
Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665)
* Replace type: ignore[attr-defined] with isinstance assertions in tests

* Fix isinstance assertions in failing tests

- Fix enum test to check for ResponseEnum instead of str
- Fix binary resource test to check for BlobResourceContents instead of TextResourceContents
- Fix Root type tests to check attributes directly instead of isinstance checks

* Fix type errors without using type: ignore

- Remove execution methods from TransformingProvider (only handles transformations)
- Add execution methods to base Provider class with default implementations
- Fix type narrowing in tests using cast() instead of type: ignore
- Fix PromptResult type handling in prompt render tests
- Fix type narrowing in middleware test for arguments and structured_content
2025-12-21 16:37:20 -05:00
Jeremiah Lowin
a41600d838
Fix: Remove JSON schema title metadata while preserving parameters named 'title' (#1872) 2025-09-23 10:19:34 -04:00
William Easton
0114f0ad3c
PR Clean-up 2025-08-25 10:18:39 -05:00
pldesch-chift
6575768d4d
Refactor TransformedTool
- Remove _find_referenced_defs method
- Update merging of defs in _merge_schema_with_precedence.
- Adjust tests in test_tool_transform.py to reflect these changes.
2025-08-25 09:33:16 +02:00
pldesch-chift
68f264ec01
Implement _find_referenced_defs method for schema reference resolution and enhance _merge_schema_with_precedence to prune unused $defs. Add comprehensive tests for new functionality in test_tool_transform.py. 2025-08-22 10:53:59 +02:00
Jeremiah Lowin
1df4771909
Ensure transformed tools generate structured content (#1443) 2025-08-11 12:34:43 -04:00
Jeremiah Lowin
3e53e62f24
Add meta support to tool transformation utilities (#1295) 2025-07-29 17:34:07 -04:00
Muhammad Khalid
a63d44576b
Fix: prune hidden parameter defs (#1257) 2025-07-28 14:00:56 -04:00
William Easton
653fe0f89f
Log tool name on transform validation error (#1238) 2025-07-23 09:56:17 -04:00
Jeremiah Lowin
9326cb91db Fix title field preservation in tool transformations
Add title parameter to Tool.from_tool() and TransformedTool.from_tool()
to properly inherit or override title field when transforming tools.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 09:53:49 -04:00
Jeremiah Lowin
0600834da4 Fix single-element list unwrapping in tool content
Single-element lists like [1] were being incorrectly unwrapped to "1"
in unstructured content while multi-element lists remained as lists.
This created inconsistent behavior where the structure was lost for
single items.

This fix ensures lists always preserve their structure in unstructured
content regardless of length, making behavior consistent and predictable.

Also removes pretty-printing from JSON serialization for more compact
output across tools, prompts, and resources.

Fixes #1064

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 12:07:16 -04:00
Jeremiah Lowin
7e983ce5b7 Fix static typing 2025-07-07 10:22:48 -04:00
William Easton
8cdce8d848
Keep json schema $defs on transform 2025-07-06 21:13:50 -05:00
Jeremiah Lowin
ef742d9400
Ensure multi-client configurations use new ProxyClient (#1045)
* Validate elicitation responses are dicts

* Ensure advanced MCP features are forwarded through proxy

* Use proxy client in tests
2025-07-05 11:57:03 -04:00
Jeremiah Lowin
7e0a237945 Fix schema wrapping for non-object union types in output schemas 2025-06-30 14:12:40 -04:00
Jeremiah Lowin
5520102821 Update failing tests 2025-06-27 22:06:35 -04:00
Jeremiah Lowin
b3799e7a73 Update typing 2025-06-27 21:54:17 -04:00
Jeremiah Lowin
db24c85359 Update all tests 2025-06-27 21:41:37 -04:00
Jeremiah Lowin
a7eb2da273 Update output schema control 2025-06-27 20:17:10 -04:00
Jeremiah Lowin
ddb557ba30 Update for 'result' kwarg instead of 'value' 2025-06-27 15:44:46 -04:00
Jeremiah Lowin
d8dc28b9b2 Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00
William Easton
1a6bb55b27
add examples to param transformation 2025-06-11 13:43:11 -05:00
Jeremiah Lowin
7ca0da7577 Add test for disabled transformation tools 2025-06-10 11:10:14 -04:00
Jeremiah Lowin
9b201cfd74 Update test_tool_transform.py 2025-06-09 17:24:11 -04:00
Jeremiah Lowin
ac89a09332 fix typing 2025-06-09 17:21:01 -04:00
Jeremiah Lowin
f8854fb3fd Add documentation 2025-06-09 17:18:04 -04:00
Jeremiah Lowin
52700a4e22 Use hide instead of drop 2025-06-09 12:38:48 -04:00
Jeremiah Lowin
642f9149d4 Allow setting type with ArgTransform 2025-06-07 17:32:22 -04:00
Jeremiah Lowin
a147eb17f4 Add tool transformation 2025-06-07 17:04:21 -04:00