Function Calling
Core Facts
Function calling (tool calling) refers to the ability of a large language model to proactively request the invocation of external functions or APIs during the generation of a response.
The basic principle of tool calling is that the model identifies scenarios requiring external capabilities, outputs a structured function call request (usually in JSON format), and after the external system executes it, the result is returned to the model to continue reasoning.
After the client receives the tool execution result, it needs to construct a message with the role set to tool, carrying the corresponding tool_call_id and execution result to send back to the model.
Timeline (last 90 days)
Hand-writing Function Calling code is no longer common in actual development, and in 2025 using an Agent framework is more recommended.
The uploader recommends a learning path of Function Calling → MCP protocol → workflow orchestration → A2A.
Function Calling allows large models to connect to external tools, converting natural language into API calls.
Function Calling has no memory function by default unless it is added separately.
In APIs that support tool calling, each tool's name, description, and JSON Schema parameter definitions are sent as input tokens with every request and are repeatedly billed across multi-round conversations.
Products like Beat are most likely built on top of LLMs, connecting to external services through function calling or similar mechanisms.
Function calling is a core mechanism for large language models to interact with external tools: developers predefine functions and describe their purpose and parameters, and the LLM decides whether to call them and generates the call parameters.
Large models themselves do not have built-in real-time knowledge of IP reputation; the point of tool calling is to bring external deterministic data sources into the reasoning chain, with the model deciding whether to query and the external service providing the query result.
In this workflow, the AI Agent uses the Gemini model and calls the threat_intel_lookup tool via Function Calling; the tool input is the source IP, and it returns a fixed JSON structure containing four fields: severity, verdict, suggested action, and a one-sentence summary.
Many model vendors implement information extraction (structured output) and tool calling within the same API.
40 more timeline events
All Facts (20)
Function calling (tool calling) refers to the ability of a large language model to proactively request the invocation of external functions or APIs during the generation of a response.
90%VerifiedThe basic principle of tool calling is that the model identifies scenarios requiring external capabilities, outputs a structured function call request (usually in JSON format), and after the external system executes it, the result is returned to the model to continue reasoning.
90%VerifiedAfter the client receives the tool execution result, it needs to construct a message with the role set to tool, carrying the corresponding tool_call_id and execution result to send back to the model.
90%VerifiedMainstream Agent architectures typically use a large language model as the brain, combined with memory modules, planning modules, and tool interfaces to accomplish complex tasks
90%VerifiedIn the tool-calling mechanism, developers attach a tool description list in JSON Schema format when calling the LLM API, and the model outputs call parameters in structured JSON format
90%VerifiedThe tool-calling (Function Calling / Tool Use) capability enables LLMs to output structured intent instructions, which are captured by an external execution layer to actually operate on systems.
90%VerifiedFunction Calling (Tool Use) is a standardized mechanism for large models to invoke external tools, where developers pre-declare tool names, descriptions, and parameter schemas, and the model autonomously determines when to make a call.
90%VerifiedOpenAI's Function Calling mechanism, Anthropic's Tool Use API, and open-source frameworks LangChain and AutoGen all fall under the category of tool-calling intelligent agents.
90%VerifiedThe underlying mechanism of Tool Use is that developers pre-define the name, description, and parameter structure (Schema) of tools, and the model determines during inference when and which tool to call and outputs structured invocation instructions.
90%VerifiedThe Function Calling mechanism allows LLMs to declare in structured JSON format the external tools and parameters they need to invoke, and the tool's return value is injected as-is into the next round of model input.
90%VerifiedThe tool-calling (Function Calling) mechanism allows the model to invoke external tools during reasoning, such as file read/write operations, terminal commands, and search APIs.
90%VerifiedOpenAI first introduced the Function Calling feature in June 2023, after which Anthropic's Claude and Google's Gemini also successively added support.
90%VerifiedMCP (Model Context Protocol) is an open protocol proposed by Anthropic, aimed at standardizing the interaction between large language models and external tools and data sources.
90%VerifiedOpenAI's Function Calling and Anthropic's Tool Use API are both standardized implementations of the ReAct pattern.
90%VerifiedOpenAI launched the Function Calling specification in 2023, allowing developers to describe function interfaces in JSON Schema format, with the model autonomously deciding when to call them and what parameters to pass.
90%VerifiedEach tool in MCP has a strict JSON Schema description, including the name, functional description, and parameter specifications
90%VerifiedAgent planning capabilities are typically implemented through the ReAct (Reasoning + Acting) framework.
90%VerifiedThe key breakthrough in tool-calling capability lies in the model's ability to generate structured function-call requests and correctly parse tool return results before continuing to reason, rather than simply concatenating tool outputs into the prompt
85%VerifiedA typical Agent is composed of a cycle of 'Perception—Planning—Action—Reflection'.
85%VerifiedBefore MCP appeared, if developers wanted AI to call external services, they usually had to write Function Calling code separately for each service, and the interfaces of different model providers were mutually incompatible.
80%