fix(core): fail fast when tool schemas can't resolve forward refs during serialization (#39570)