Thank you, your message has been sent. It has reached the Visilayer team and someone will reply to you shortly.
Technical Guide · Mechanics of AI

Function Calling and Tool Use: How AI Takes Action

A language model on its own can only do one thing: produce text. It cannot check today's weather, look up a booking, send an email, or query a database. Everything it says comes from what it learned in training plus whatever you put in the prompt. Function calling, also called tool use, is what lets a model reach outside itself. It is the bridge between an AI that talks and an AI that does.

The basic idea

With tool use, the model is told about a set of tools it is allowed to use. Each tool has a name, a description of what it does, and a description of the information it needs. A weather tool might need a city and a date. A booking lookup might need a confirmation number.

When a question arrives, the model reads it and decides whether answering requires a tool. If it does, the model does not try to invent the answer. Instead it writes a small, structured request: which tool to call and what to pass to it. The surrounding system runs the tool, gets the real result, and hands that result back to the model. The model then writes its answer using the result.

A simple example

A guest asks an assistant, "Is the spa open tomorrow afternoon?" The model knows it cannot answer that from memory. It sees a tool called check_opening_hours that takes a facility and a date. It produces a request: check_opening_hours, spa, tomorrow. The system runs that against the hotel's live schedule and returns "open 10:00 to 20:00". The model reads that and replies, "Yes, the spa is open tomorrow from ten in the morning until eight in the evening."

Notice what the model did not do. It did not guess the hours. It recognized a gap, asked the right question of the right system, and reported the real answer.

Why this matters

Tool use turns a model from a knowledgeable conversationalist into something that can act within real systems. Three things change.

Facts become live. Instead of relying on stale training data, the model can fetch current prices, availability, or status at the moment of the question.

Actions become possible. A tool can do things, not just report them. Book a table, create a ticket, send a confirmation. The model decides when, the tool does the work.

Guessing drops. When a model has a tool for something, it tends to use the tool rather than invent. Giving a model the right tools is one of the most effective ways to reduce hallucination about specifics.

The model decides, the system acts

An important detail is that the model never runs the tool itself. It only produces a request. The surrounding software decides whether to honor it, runs it, and controls what comes back. This separation is what keeps tool use safe. A model can ask to cancel a booking, but the system can require confirmation, check permissions, or refuse. The model proposes, the system disposes.

Where it connects to agents

Tool use is the foundation of AI agents. An agent is a model that can use tools in a loop: call one, read the result, decide what to do next, call another. Booking a trip might mean checking flights, then hotels, then availability, each a separate tool call chained by the model's reasoning. The newer protocols for connecting models to tools, such as MCP, are essentially standard ways of describing tools so any model can use them.

What this means for your business

As assistants gain tools, the question shifts from "does the AI know about me" to "can the AI reach me". A model with a tool that queries your availability, your menu, or your hours can give accurate, current answers and even take bookings. A model with no way to reach you is back to guessing from whatever it read once. Making your information available in a structured, machine readable form is what makes your business usable as a tool, not just mentionable as a fact.