GPT-5 + Freeform Tool Calling: Why This Changes Everything
By Ivana Tilca · August 25, 2025 · 5 min read
Okay, so if you didn’t know yet — GPT-5 is already live in Azure AI Foundry via Azure OpenAI. And yeah, it’s powerful. But the part I’m most excited about (and you should be too if you build agentic workflows or automate anything) is something called Freeform tool calling. Let me break it down.
What’s Freeform Tool Calling?
Basically, GPT-5 can now send raw text — like Python scripts, SQL queries, or config files — straight to your tools. No JSON. No weird formatting rules. Just clean, readable code or text, exactly how your tool expects it.
Why You Should Care
Here’s what this unlocks:
Way easier dev workflows — no more fighting with formatting. #thisisamazing
Richer interactions — GPT-5 can talk to your tools like a teammate.
Complex tasks feel simple — chaining tools together just works.
If you’re building anything agentic, this is a game-changer.
Let’s Test It
I’ve got a demo script that shows how this works. It’s super simple:
GPT-5 generates SQL → Tool executes SQL → Tool formats result with Python → You get a clean output, no human intervention.
Here’s what’s happening under the hood:
1 - Imports & Setup We load libraries for SQLite, CSV, I/O, and connect to Azure.
2 - Azure Client Init We connect to our Azure AI Foundry project and grab GPT-5.
3 - Tool 1: sql_exec_sqlite This tool takes SQL from GPT-5, runs it in-memory, and returns the result as CSV.
4 - Tool 2: code_exec_python This one takes the CSV, prints a formatted table, and sums up a column (like revenue).
5 - Prompt GPT-5 We ask it to:
Create an employees table
Insert sample data
Select and sort the data