Home Glossary Function Calling

Function Calling - Page 6

Function calling is a capability that allows a language model to select an external function and produce structured arguments for it. The application defines available tools, such as searching a database, checking inventory, calculating a value, or creating a calendar event. When the model requests a call, trusted software validates the arguments, runs the function, and can return the result for the model to incorporate into its response. The model does not execute arbitrary code simply because it generated a call. Secure implementations restrict permissions, validate schemas, handle failures, protect sensitive data, require confirmation for consequential actions, and treat tool output as potentially untrusted input.