9514d354ca
The generic tool_call(name, arguments: object) bridge hides a deferred tool's real parameter schema from provider-native validation. Before this, only top-level required-key absence was checked, so invalid enums, wrong types, nested required fields and forbidden extra properties reached the handler or MCP server. Now the call is coerced (same coerce_tool_args path normal dispatch uses) and validated with the schema's declared JSON Schema draft; failures return the path, constraint and parameters schema so the model repairs the call in one round-trip. Fails open on missing/malformed schemas, external $ref, or missing jsonschema. Fixes #73175 Salvaged from #73179 onto current main (post core-tool deferral #97979). Co-authored-by: teknium1 <teknium@nousresearch.com>