Function Calling
Core Facts
Mainstream Agent architectures typically use a large language model as the brain, combined with memory modules, planning modules, and tool interfaces to accomplish complex tasks
Function 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.
The 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.
Timeline (last 90 days)
In terms of separation of concerns, when using an API for Function Calling the tool logic is written in the application code, LangChain tightly couples tool logic with Python code, and MCP adopts a decoupled architecture in which the Server runs in a separate process or container.
The technology selection judgment process is: first prepare test data to verify feasibility; when basic capabilities are insufficient, prioritize RAG; when external systems need to be connected, use Function Calling; and only consider fine-tuning in scenarios such as improving stability, reducing inference costs, and private deployment.
Vague parameter descriptions in tool-calling JSON Schemas can significantly raise the model's call error rate.
Excessive quantization may lead to a higher JSON format error rate during tool calling.
The difference between an Agent Loop and a single API call in tool calling is that a single call has no tool-calling capability and can only output text, while an Agent Loop can call tools such as the file system, databases, and external APIs.
Function calling has since become the industry de facto standard.
The Function Calling mechanism turns "which tools the model can call" from a vague convention in the prompt into a verifiable interface contract: non-compliant parameters can be rejected, unregistered tools cannot be called, and permission boundaries thus gain a technical foothold.
Traditional Function Calling requires writing separate adapter code for each tool, whereas MCP makes tools 'plug-and-play', greatly reducing the development cost of Agent integration.
Compared with using Function Calling to query the database directly and then stuff the results into the context, RAG's advantages lie in precise matching, controllable context usage, and less likelihood of blowing up the context window in multi-turn conversations.
When selecting a model, the degree of support for Function Calling and JSON Output should be checked as a hard requirement, as support varies greatly across models (some work out of the box, some require fine-tuning, and some do not support it at all).
40 more timeline events
All Facts (20)
Mainstream 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%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%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 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%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%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%VerifiedThe core mechanism of Function Calling is that developers describe external function signatures in JSON Schema format, and the model outputs structured JSON invocation instructions that conform to the schema specification.
80%VerifiedThe underlying operational logic of an Agent Loop is an iterative cycle of 'perception–planning–action–observation.'
80%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.
80%VerifiedDeepSeek R1 does not support Function Calling by default, whereas DeepSeek V3 supports Function Calling.
80%VerifiedFunction Calling is the core mechanism for large models to interact with external systems, allowing the model to call predefined functions after identifying user intent.
80%Verified在MCP出现之前,AI调用外部工具主要依赖OpenAI的Function Calling机制或各框架自定义的插件系统
80%VerifiedTool-Augmented AI is an important development direction for current large model applications, with mechanisms such as OpenAI's Function Calling and Anthropic's Tool Use underpinning this paradigm at the foundational level.
80%VerifiedThe principle of Function Calling is that, in addition to generating natural language text during inference, the model can also output structured function-call instructions (JSON containing the function name and parameters).
80%VerifiedFunction Call is a capability introduced by OpenAI in June 2023 with the GPT-3.5/GPT-4 API update, allowing developers to define JSON Schema descriptions of functions in API requests.
80%VerifiedMCP(Model Context Protocol)是Anthropic提出的开放协议,旨在标准化大模型与外部工具、数据源之间的交互方式
80%VerifiedOpenAI was the first to introduce Function Calling capability in June 2023.
80%