Mistral Patents Tool Calls via Executable Code

Translated by a model; the original is in Russian.

· Artificial intelligence
The U.S. Patent Office has granted Mistral AI a patent on a method in which a language model composes and executes code to call external tools. The application describes a technique many consider standard industry practice.

cover.svg

The United States Patent and Trademark Office (USPTO) has published patent US 12 670 045 B1, titled “Code implemented tool calls.” The assignee is listed as the Paris-based company Mistral AI, and the inventor is Gabriel Vergnaud. Application No. 19/557 103 was filed on March 4, 2026, and the document includes 20 claims.

What exactly is described

The main claim describes a method for a server operating with a large language model. The server receives a request from the user to perform one or more tool calls. In response, the model generates a block of code in some programming language that encapsulates those calls. The server executes this code in a sandbox.

When execution reaches a tool call that requires an external result, the code's operation is paused. The pending call is passed to the client, which performs it and returns the result. The server substitutes the received result in place of the corresponding call, resumes execution of the code, and at the end returns the outcome to the language model.

In other words, instead of the model requesting each tool one at a time through separate messages, it writes a program up front that describes the entire logic of the calls, and the server runs it, pausing wherever a response from the client side is needed.

Why it drew attention

The publication sparked a lively discussion on Hacker News: 139 votes and more than a hundred comments. The reason is clear from the very essence of the patent — the approach in which the model frames its tool calls as executable code, rather than as a set of structured calls, has long been discussed in the community and is used in various agentic frameworks. The idea of “tool calls as code” looks more like an established engineering practice than an unexpected invention.

The mere fact that a patent was granted for such a construction raises the industry's familiar question about the limits of patentability for techniques that many developers consider obvious. Formally, though, Mistral now holds a granted right to the specifically described scheme involving pausing code execution in a sandbox and substituting the results of the calls.


Source: Hacker News

Comments

Sign in, to comment.

  • No comments yet.