Oftentimes APIs are defined and documented via OpenAPI specification. The Cloudflare ai-utils package’s createToolsFromOpenAPISpec function creates tools from the OpenAPI spec, which the LLM can then leverage to fulfill the prompt.
In this example the LLM will describe the a Github user, based Github’s API and its OpenAPI spec.