[KongchangAI]
ConceptFunction Calling / 工具调用

Tool Calling

Tool Calling is a capability mechanism that enables large language models (LLMs) to interact with external tools or APIs. During response generation, the model can identify user intent and produce structured tool-invocation instructions; the runtime environment then executes the corresponding functions or services and returns results to the model. This enables tasks beyond pure text generation, such as information retrieval, code execution, and data manipulation, and is a foundational capability for building AI agents and complex automated workflows.

Core Facts

Timeline (last 90 days)

Oct 27

Models typically treat the `success` returned by a tool as fact rather than independently verifying system state, stemming from the high correlation between tool returns and task completion in their training data.

Unverified50%
Oct 23

In the Tool Calling mechanism, AI models generate a JSON Schema to describe the function names and parameters to be called, thereby avoiding hallucinated execution.

Unverified50%
Oct 20

In a stateless function, the full context must be serialized and passed to the next round between each round of tool calls; the longer the call chain, the higher the overhead and the probability of errors.

Unverified50%
Oct 20

A Tool in LangChain is usually a Python function with a name, description, and parameter schema, and the Agent uses prompts to let the model understand the available tools and their applicable scenarios.

Unverified50%
Oct 19

In the tool-calling loop, assistant messages containing tool_calls must be passed back in the history verbatim and must not be rebuilt, otherwise the API cannot match them correctly.

Unverified50%
Oct 17

LLM tool calling (Tool Calling/Function Calling) is a capability of large models: the model generates structured tool-call requests according to a preset JSON Schema, external code executes them and passes the results back to the model, and the model continues reasoning based on the results.

Unverified50%
Oct 17

In tool calling, the model may generate parameters that do not conform to the Schema, omit required fields, or confuse tools across multiple rounds of calls, so production environments usually need a validation and fault-tolerance layer between the model and the tools.

Verified65%
Oct 16

Due to the stateless design of large model APIs, the entire tools array must be resent in every request, alongside the system prompt and conversation history.

Unverified50%
Oct 14

Tool Calling is a capability of large language models: when generating a reply, the model outputs structured JSON indicating which function to call and what parameters to pass, but the model only outputs intent and does not execute code; the responsibility for execution lies on the application side.

Verified65%
Oct 14

When the number of tools is small, they belong to a single application, and their lifecycle is synchronized with the main program, directly using Spring AI's @Tool annotation-style Tool Calling is the simplest and most efficient solution.

Unverified50%

22 more timeline events

All Facts (20)

Verified

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.

90%
Verified

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.

90%
Verified

Since 2024, companies including OpenAI, Anthropic, and Google have successively launched agent frameworks.

90%
Verified

Agents use the Tool Calling mechanism to allow models to output calling intent in a structured JSON format, with external programs executing the actual operations and feeding results back to the model.

80%
Verified

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.

80%
Verified

AI SDK is a toolkit that helps developers build AI applications by abstracting common logic for interacting with large language models, such as streaming responses, message state management, and tool invocation.

75%
Verified

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.

75%
Verified

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.

75%
Verified

The 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

75%
Verified

The Deep Research feature decomposes a single user query into multi-step autonomous research tasks, invokes tools such as web search and document analysis, and uses large language model reasoning to synthesize and output a structured report.

75%
Verified

Tools are essentially function wrappers for external capabilities, paired with JSON Schema descriptions that enable the model to understand a tool's functionality and parameter format.

75%
Verified

LangChain is an open-source framework whose core capability is combining large language models with external computing resources and data sources.

75%
Verified

Function Call does not actually execute code; the model only outputs a structured JSON string, and the actual execution is performed by the host program.

75%
Verified

The naming, description, and parameter documentation of a tool are the key context for an Agent to decide when to call it, and can be understood as a form of prompt engineering.

70%
Verified

OpenAI's function calling/tool use mechanism is a hard constraint; the model inference engine directly constrains the valid set of output tokens during the decoding phase, thereby guaranteeing format compliance at the protocol level.

70%
Verified

In tool calling, the model may generate parameters that do not conform to the Schema, omit required fields, or confuse tools across multiple rounds of calls, so production environments usually need a validation and fault-tolerance layer between the model and the tools.

65%
Verified

Tool Calling is a capability of large language models: when generating a reply, the model outputs structured JSON indicating which function to call and what parameters to pass, but the model only outputs intent and does not execute code; the responsibility for execution lies on the application side.

65%
Verified

The 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.

65%
Verified

工具调用(Function Calling/Tool Use)是Agent系统的核心能力,允许模型动态调用搜索引擎、代码解释器、数据库查询、API接口等外部资源

65%
Verified

The perception→reasoning→invocation→feedback loop of function calling is the engineering implementation of the ReAct (Reasoning + Acting) framework.

65%

Source Articles