Function Callingdefinition and how it works in 2026
- Function Calling
- LLMが構造化されたJSON形式で外部関数を呼び出す機能 — 「ツール使用」の実装の中核となるAPI仕様。
Function Calling は、OpenAI が2023年に正式化したAPI機能で、現在はすべての主要モデルで標準化されています。モデルは「この関数を、これらの引数で呼ぶべき」と判断し、構造化された出力を返します。アプリケーション側がそれを実行して結果を返します。
MCP との関係:Function Calling は「呼び出し方法」の仕様、MCP は「どんな関数があるか」のカタログプロトコル。両者は補完関係で、Function Calling は MCP の下位レイヤーで動作します。
実装上の注意:Function Calling のスキーマ設計は重要です。曖昧な引数定義、過度に汎用的な関数、戻り値の型不一致は、エージェントの精度を大きく下げる原因になります。
Frequently asked
Is function calling the same as tool use?+
Function calling is the API mechanic; tool use is the agent capability. The model "function-calls" a tool; the loop is "tool use". The terms are often used interchangeably.
How many functions can an LLM reliably call from?+
Frontier models in 2026 handle 20–30 functions well. Past 50, accuracy drops sharply and most teams either split into specialized agents or move tool selection into a retrieval step before the LLM call.
Can the model call multiple functions in one turn?+
Yes — most 2026 frontier APIs support parallel function calling. The model emits a list of calls; the runtime executes them concurrently and returns results together. Cuts agent latency by 30–60% on multi-tool steps.
