This post from the LangChain team introduces a standard interface in LangChain for tool calling, the capability that lets a model return a list of tool invocations alongside or instead of plain text (see Function calling). Its occasion was that more and more model providers were exposing native tool calling, each through a slightly different interface — including, the post notes, the three it calls the highest-performing, OpenAI, Anthropic and Gemini, which were incompatible with one another — and that the community wanted a standard way to switch between them.
The interface has three parts: ChatModel.bind_tools() for attaching tool definitions to model calls,
an AIMessage.tool_calls attribute for reading the tool calls a model decided to make, and
create_tool_calling_agent(), an agent constructor that works with any model implementing both. The
post states that it is fully backwards compatible and supported on all models with native tool-calling
support.
Key Points
- The post dates native tool calling to OpenAI’s “function calling”, released roughly a year before the post and evolving into “tool calling” in November; it lists Gemini, Mistral, Fireworks, Together, Groq, Cohere and Anthropic as following between December and April.
- Tool definition formats differ by provider — OpenAI expects
name,descriptionandparameters, Anthropicname,descriptionandinput_schema— andbind_toolsaccepts raw definitions as well as Pydantic classes, LangChain tools and plain functions, so the same definitions can be used with any tool-calling model. - Tool invocations had previously been found in
AIMessage.additional_kwargsorAIMessage.contentin a provider-specific format;tool_callsreturns them as a list ofToolCallentries, each carrying a name, arguments and an optional id. create_tool_calling_agent()generalizes the earliercreate_openai_tools_agent(), which worked only with models following OpenAI’s tool-calling API.- The same interface simplifies building agents in LangGraph.
with_structured_output()is built on tool calling for most models that support it: it always returns output in a given schema, which suits information extraction, whereasbind_toolslets the model pick one tool, several, or none, which suits agents that must also respond to the user.
Context
The post is the vendor’s announcement of a change to its own framework and says it expects the trend toward native tool calling in models to continue.