Programmatic tool calling—letting models write code to invoke tools—is a simpler, more flexible alternative to JSON-based tool calling that performs as well or better across model generations, particularly for complex multi-tool scenarios.
This paper compares two ways for language models to use tools: programmatic tool calling (where models write Python code to invoke tools) versus native JSON tool calling (rigid structured calls).