Skip to content
Agent Month

Function calling (tool use)

Function calling is a model capability that lets it request a structured tool call, which your code executes and returns results for.

With function calling (also called tool use), you describe available tools to the model; when appropriate, it returns a structured request to call one with specific arguments. Your code runs the tool and feeds the result back, often in a loop.

It’s the mechanism behind agents and most LLM integrations with real systems. MCP builds on top of it by standardizing how those tools are exposed and discovered across clients.

Reliable tool use depends on clear tool descriptions, validated inputs, and graceful error handling so the model can recover when a call fails.