Back to glossary

Term

Function Calling

Function calling is a language model's ability to produce a structured function invocation instead of a text reply — the technical foundation for tool use and AI agents.

Function Calling — explained in more detail

Function calling (also called tool use) extends an LLM with the ability to call defined functions. The application developer describes available functions with name, parameters and a JSON schema; during a response the model decides itself whether and which function to call with which arguments. The actual execution happens outside the model, inside the application — the result is fed back, and the model can continue from there.

Anthropic, OpenAI and Google all offer comparable schemas: a tools array with function definitions, a tool_use block in the response, a tool_result block in the follow-up message. Function calling is the blueprint layer beneath concepts like MCP, AI agents and multi-step workflows.

Example / practical context

Application: a travel bot has three tools registered — search_flights, book_flight, send_confirmation_email. The user writes: “Find me a flight Berlin–Lisbon next Friday.” The model calls search_flights({from: "BER", to: "LIS", date: "2026-05-08"}), gets the list, presents it to the user and waits for selection before invoking book_flight.

Distinction from similar terms

Function calling is the interface. An AI agent combines function calling with a control loop, memory and stop condition. MCP is a standard that makes the function library interchangeable across different clients and servers.

Entdecke mehr

Themenuebersicht