Original editorial illustration for this topic. Not an official product screenshot or a depiction of the exact reported event.
Function calling lets a model request an application-defined operation, such as looking up weather or retrieving an order. The model usually proposes structured arguments; the application validates them, executes the action and returns a result. The model does not acquire direct permission to your server simply because it can name a function.
What to evaluate before choosing a tool
A safe design defines narrow function schemas, validates argument types, enforces authorization in ordinary code and makes side effects explicit. Retrieval tools may be read-only; email sending and account changes need separate safeguards. Tool descriptions should focus on what each function can legitimately do, not invite the model to invent undocumented behavior.
Step-by-step workflow
- Define one function with specific inputs, required fields and allowed values.
- Send the schema to the model through the supported API tooling interface.
- When a tool call is returned, validate the arguments and current user permissions.
- Execute the function with timeouts and controlled error handling.
- Return the result to the conversation, and audit irreversible operations.
Practical example
Here is an original example you can adapt to your own project. Its wording is a starting point, not a guarantee of a particular result.
Common mistakes and limitations
Never trust a model-supplied price, account ID or file path without authorization checks. Prompt injection in retrieved webpages can attempt to steer tool calls, so permissions must be enforced outside the prompt.
When this approach makes sense
Function calling is an orchestration contract. Reliable applications combine model flexibility with conventional software validation.
Frequently asked questions
Is function calling the same as executing code?
No. A model can request an action; the application controls whether and how it is executed.
Who checks permissions?
Your application and its services must enforce them independently of the model.
Official sources and documentation
These primary references describe the products and concepts used in this guide. They are not evidence that Runway Presstoday independently tested every feature.