Python: fix(claude): preserve $defs in JSON schema for nested Pydantic models (#3655)

* fix(claude): preserve $defs in JSON schema for nested Pydantic models

- Preserve $defs section from Pydantic JSON schema when converting FunctionTool to SDK MCP tool
- This fixes tools with nested Pydantic models that use $ref references
- Add test for nested type schema preservation

Fixes #3654

* Adjust shared state import

* Fix MCP tool kwargs serialization bug

---------

Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
This commit is contained in:
Dineshsuriya D
2026-02-04 12:04:26 +05:30
committed by GitHub
Unverified
parent 06d43ee130
commit 5c6cf4fc92
6 changed files with 50 additions and 5 deletions
@@ -32,9 +32,9 @@ from typing import Any, Literal, cast
from agent_framework._workflows import (
Executor,
SharedState,
WorkflowContext,
)
from agent_framework._workflows._shared_state import SharedState
from powerfx import Engine
if sys.version_info >= (3, 11):