that code is all for discovering the fucking JSON schema definition so that it can feed it into the [JSON schema validation loop](https://neuromatch.social/@jonny/116326861737478342 ). So ADD ANOTHER LAYER where the LLM can call some imagined tool and return nonsense output and then ask itself for the schema for the nonsense so that it can then ask itself over and over again to change the output until it fits the nonsense schema.
WHY ON EARTH would it be possible for there to be a tool that you *already called* but somehow *haven't loaded its schema* and can then *consult your context window* for it. what is HAPPENING