i think this is what your looking for, https://developers.cloudflare.com/workers-ai/features/json-mo

Cloudflare Docs
When we want text-generation AI models to interact with databases, services, and external systems programmatically, typically when using tool calling or building AI agents, we must have structured response formats rather than natural language.
Was this page helpful?