Skip to content

Commit 94bc9eb

Browse files
committed
more comments
1 parent c1225c1 commit 94bc9eb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

langchain_mcp_adapters/tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ def _parse_field(props):
193193
from langgraph.prebuilt import InjectedState
194194
model_fields = _parse_model_fields(args, injected_state)
195195

196+
# recreate a dynamic model based on the parsed JSON schema, which will be properly parsed
197+
# with annotations for the InjectedState
196198
args_schema = create_model(tool.name, **{k: v for k, v in model_fields.items()})
197199

198200
return StructuredTool(

0 commit comments

Comments
 (0)