Architecture
How OpenTools works under the hood
When you choose a hosted tool from our registry, we will execute the tool call and ground the response for you. This setup performs your LLM and tool calls happen in one HTTP roundtrip rather than multiple.
Generations and Calls
There are two main objects.
- A Call (ID prefixed with
call_
) is either an LLM call or a tool call. Calls happen sequentially — for example, an LLM call might result in a tool call, whose result needs to be fed into another LLM call. Every call belongs to a Generation (many-to-one). - A Generation (ID prefixed with
genr_
) are 1-to-1 with requests to create a chat completion. They will spawn between 1 and 9 child Calls (LLM → Tool → LLM → … → LLM), depending on how many tool calls the model invokes. If there’s no resolution by the 9th call in the sequence, we return the final LLM call as-is to prevent runaway costs.
MCP client abstraction
Under the hood, OpenTools is a Model Context Protocol (MCP) client. We handle the underlying protocol implementation details for you.
This abstraction lets you benefit from the power of MCP tools via API without having to implement an MCP client yourself. You get the power of augmented LLMs with minimal integration effort.