Function Calling with Ollama: Make Your Local LLM Run Real Tools Most Ollama tutorials end at chat completion. The interesting stuff starts when the model can call your code. Function calling is the protocol that lets an LLM say "I want to call getWeather(city: 'Bogotá') " instead of trying to fake the answer from training data. Cloud models like GPT and Claude have had it for over a year. Ollama supports it natively for compatible models. Almost nobody talks about it. This post walks through a complete working example. End to end, two hundred lines of TypeScript. Why function calling matters Without it, your LLM is a closed system. It only knows what's in its training data. With it, the LLM becomes a planner that calls real APIs, queries databases, runs calculations, hits your code. That's the difference between "interesting demo" and "production-grade agent." The trick: the LLM doesn't actually call your function. It returns a structured request, and your code decides whether to execute it. Always.…