Function Tool Calling

Function Tool Calling: Let Your AI Agent Use APIs

For support and operations teams whose answers live behind an API. Point your AI agent at your own endpoints and it can check an order, book a slot or update a record mid-conversation, instead of telling the customer to email someone. Every tool is tested before it can go live.

ISO/IEC 27001:2022 certified Meta Tech Partner Secrets stored encrypted, never in a URL

What Is Function Tool Calling?

Function tool calling — known more widely as function calling, AI function calling or simply tool calling — is how an AI agent stops guessing and starts fetching. You register one of your own API endpoints as a tool, describe in plain language when it should be used, and the agent decides for itself when a conversation needs it, then calls it and uses the response in its reply.

In Robofy this lives under Function Tool Call. You build each tool in four steps, map what the AI collects from the customer onto your request, and run a live test — a tool cannot be saved until that test passes. From then on the agent can look up an order, check availability or create a ticket without a person in the middle.

Read the full Function Tool Call documentation
Beyond Answers

Your AI Agent Already Understands the Customer. Now Let It Take Action.

Traditional AI chatbots can answer questions using websites, documents, and knowledge bases. But many customer requests require access to live business data. Customers may ask:

Where is my order?
What is the status of my refund?
Is this product available?
Can you reschedule my appointment?
Create a support ticket for me.
What is my outstanding balance?
Update my customer information.

Function tool calling lets the agent call the right API automatically, pull the data it needs, and respond or complete the request without a human stepping in.

What It Can Do

Examples of What Your Agent Can Do

GET /orders/12452 200 OK
{ "status": "shipped", "eta": "tomorrow" }

Retrieve Data

Check orders, inventory, invoices, customer accounts, subscriptions, shipments, appointments, product availability, and more.

orders inventory invoices accounts
In Action

From Conversations to Actions

Order Tracking
Customer
Where is my order #12452?
Order API Retrieve Status Respond
Your order has been shipped and is expected to arrive tomorrow.
Appointment Booking
Customer
Can I book an appointment for Friday afternoon?
Availability API Check Slots Booking API Confirm
Your appointment is confirmed for Friday at 2:00 PM.
Customer Account Information
Customer
How much do I currently owe?
Customer API Retrieve Account Retrieve Balance
Your current outstanding balance is $128.50.
Support Automation
Customer
My product stopped working. Please raise a support request.
Support API Create Ticket Return Ticket #
Support ticket #4821 has been created for you.
Every System, One Agent

Connect Your AI Agent to Your Business APIs

Your business data can live in more than one place. Your AI agent can reach into your:

AI Agent

You define the API and when it should be used. The agent decides when to call it based on the customer's conversation. Customers don't need to know whether their information lives in the CRM, the e-commerce platform, or an internal database; they just ask, and the agent figures out which system to call.

You're also not limited to prebuilt integrations. If your application exposes an API, you can turn it into a tool the agent can use, which is especially handy for proprietary software or workflows spread across multiple systems.

One requirement worth knowing up front: the endpoint has to be reachable from the public internet over HTTPS. A system that only listens on your private network or localhost is deliberately blocked, so an on-premise tool needs a public, authenticated endpoint in front of it first.

The Builder

Build a Tool in Four Steps

No custom connector code to deploy. You describe the endpoint and what the AI should collect, and Robofy assembles the request.

Step 01 · Basics

Name the tool for the AI

A short machine name, plus a description of when to use it. That description is what the model reads to decide whether this tool fits the conversation, so write it like instructions for a teammate.

Tool name
check_order_status
When should the AI use this?
Look up the status and delivery date of a customer order by its order number. Use this whenever the customer asks where their order is.
Step 1 in the docs
01
02

Step 02 · Inputs

Decide what the AI collects

One card per argument the agent should gather from the conversation. Each input is typed and can carry a description for the model, a default, allowed values, min and max, or a regex pattern. Tools that only need fixed values or secrets can skip this entirely.

Input
order_number  ·  string  ·  required
Description for the AI
The customer's order number, e.g. A-1042
Step 2 in the docs

Step 03 · API call

Build the HTTP request

Endpoint and method, then how it authenticates: nothing, a stored credential, or the signed-in visitor's own token. Click a token chip to drop it into the URL or a header. Secrets are only ever allowed in headers.

Endpoint
GET https://api.yourcompany.com/orders/{order_number}
Available tokens
{order_number}{credential.api_key}{host.projectId}
Step 3 in the docs, with the full token reference
03
04

Step 04 · Preview

Check it, then test it

Sample values fill the request so you can confirm the shape before anything runs, with secrets kept masked until our server resolves them. Then run the test: a GET executes for real, while a POST, PUT or DELETE is built and smoke-checked but never sent. The tool cannot be saved until that test passes.

Preview
GET /orders/A-1042  ·  Authorization: Bearer ••••••
Test result
200 OK  ·  Succeeded
Step 4 in the docs, and how Test API behaves
Capabilities

What a Technical Evaluator Needs to Know

The real behavior of function tool calling, not a simplified summary.

Authentication

Three modes: no auth, a stored credential attached automatically via a header, or the signed-in visitor's own token forwarded as a Bearer header, so a call can be authenticated as that specific customer, not just a shared service account. Secrets are only ever allowed in headers, never the URL or body.

Security

HTTPS only. Redirects are never followed. Private and internal network addresses are blocked before the call and re-checked at connection time, so a tool URL can't be pointed at private, internal, or loopback services.

Timeout and retries

12-second timeout per call. Only GET is retried automatically, with exponential backoff, and only on rate limits (429), timeouts (408) or server errors (5xx). Every other method is sent exactly once — PUT and DELETE included, even though HTTP treats them as idempotent — so a slow “create booking” call can never silently double-book. An expired or invalid credential fails immediately instead of retrying uselessly.

Multi-step chaining

A single turn can call more than one API, check availability, then book, then confirm, to complete a full request, not just answer a question.

How it's configured

You define the endpoint, the method (GET, POST, PUT or DELETE), and when to use it in plain language; the agent decides at runtime which tool the conversation actually needs. Up to 15 tools per agent.

Per-call approval

Any tool can require the visitor to approve each call before it runs, with your own approval wording on the card. Available on the web widget; there is no confirmation UI on WhatsApp, so approval-gated tools are web only.

Visitor-authenticated tools

Tools using the signed-in visitor's own token require your page to identify the visitor through the install snippet's identify / setAuth helpers. Until it does, those tools are left out of the conversation entirely, and they are never offered on WhatsApp.

Input rules

Each input the AI collects is typed (string, number, boolean, array, object) and can carry a description for the model, a default, required flag, allowed values, min/max, or a regex pattern.

Credential storage

Secrets live in an encrypted credential store. The tool itself holds only a reference and the field names, so exporting a tool never exports the secret.

Copy between agents

Export selected tools as JSON and import them on another chatbot. Credential references travel; the secrets themselves do not.

Safe by Default

Nothing Goes Live Until It's Been Tested

The most common way an AI integration embarrasses you is shipping a tool that was never actually called. Robofy makes that impossible.

Reads are really run

A GET tool is executed against your live endpoint with sample values you supply for that probe only. You see the real response before you save, and those sample values are never stored on the tool.

Writes are never sent

For a POST, PUT or DELETE, testing builds the exact request and shows it to you as a redacted preview, then stops without sending it. Robofy also runs a read-only GET against the same URL with your resolved auth headers: a 401 or 403 tells you the credential was rejected, a success tells you it was accepted, and anything else is reported as inconclusive, because write-only endpoints often don't answer GET at all. The write itself never happens, so you can validate an order-creation tool without creating an order.

A tool stays a draft until its test passes. Until then the agent cannot call it.

How Test API behaves, in the docs

Why This Way

Why Not Just Use Prebuilt Integrations?

Prebuilt connectors cover the tools everyone has. They rarely cover the system your business actually runs on.

Prebuilt connectors compared with function tool calling
Scenario A fixed connector list Function tool calling
Your in-house system Unsupported unless someone builds a connector for it Works today if it has an HTTPS endpoint
Changing a field Wait for the vendor's roadmap Edit the tool, re-test, save
Doing it by hand instead Someone reads the chat, opens the admin panel, copies the answer back The agent fetches it mid-conversation
Per-customer data Usually one shared service account for everyone Can authenticate as the signed-in visitor

Scroll the table sideways to compare

Function tool calling is included with every Robofy AI agent. See plans and pricing.

Trust & Control

Security Guardrails for AI Tool Calling

Hard rules enforced by the runtime on every call — not settings you have to remember to switch on.

Always

  • Calls over HTTPS only, with private/internal addresses blocked.
  • Redacts authorization headers and known secret values from logs.
  • Retries GET only, and only on a 429, 408 or 5xx.

Never

  • Follows a redirect on a tool URL.
  • Retries anything but a GET — POST, PUT and DELETE are each sent once.
  • Reaches a private, internal or loopback address, or an endpoint that isn't HTTPS.
  • Accepts a secret placed in a URL or request body.
  • Lets a value the model supplied resolve to one of your secrets — inputs and credentials use separate token namespaces.
  • Sends Robofy's own internal token to an endpoint you supplied.

Channels and security, in the docs

FAQ

Frequently Asked Questions

Real questions from technical evaluators and buyers.

Can I connect any API, or only certain ones?

Any API with a public HTTPS endpoint, using GET, POST, PUT or DELETE. You define the endpoint, the method, and what it does in plain language, and the agent decides when a conversation actually needs it — there's no list of pre-built integrations to pick from. What won't work: plain HTTP, and anything that only resolves to a private, internal or loopback address. Both are blocked on purpose, so an on-premise system needs a public, authenticated endpoint in front of it first.

What if my API needs authentication?

Three modes are supported: no auth, a stored credential attached automatically via a header, or the signed-in visitor's own token forwarded as a Bearer header. Secrets are only ever allowed in headers, never the URL or request body.

What happens if my API times out or fails?

Each call has a 12-second timeout. Only GET is retried automatically, with exponential backoff, and only on a rate limit (429), a timeout (408) or a server error (5xx). Every other method is sent exactly once — PUT and DELETE included, even though HTTP treats them as idempotent — so a slow "create booking" call can't silently double-book. A bad or expired credential fails immediately instead of retrying uselessly.

Troubleshooting guide in the docs
Can the agent call more than one API to complete a request?

Yes. A single turn can chain multiple tool calls — for example, checking availability, then confirming a booking — so the agent can complete a full request, not just answer a question.

How do I test a tool without affecting real data?

Testing behaves differently depending on the method. A GET tool is genuinely called against your endpoint using sample values you provide for that probe, so you see the real response. A POST, PUT or DELETE is built and shown to you as a redacted preview, but never sent. Alongside it Robofy runs a read-only GET against the same URL with your resolved auth headers, which reports one of three things: the credential was rejected (401 or 403), the credential was accepted (a success response), or the check was inconclusive — write-only endpoints often don't answer GET, and a redirect isn't followed. Either way the write never happens, and a tool stays a draft until its test passes.

Can I require the customer to approve an action first?

Yes. Any tool can be set to ask the visitor for approval before it runs, and you write the sentence shown on that approval card. It relies on the widget's confirmation UI, so it works on the web widget and not on WhatsApp.

How many tools can one AI agent have?

Up to 15 custom tools per agent. If you have several agents, you can build a tool once and export it as JSON, then import it on another agent. Credential references come across with it; the secrets themselves stay behind.

Does function tool calling work on WhatsApp as well as the website?

Standard tools work on both. Two kinds are web-widget only: tools that require per-call visitor approval, because WhatsApp has no confirmation card, and tools authenticated as the signed-in visitor, because that identity comes from your web page. Those are labelled web-only in the builder so it is clear before you ship.

Do you store the credentials I add?

Stored credentials are kept for use in the headers you configure and are never written to logs — request and response logging redacts authorization headers and any known secret values automatically.

Is function tool calling the same as AI function calling?

Yes — function calling, AI function calling and tool calling all describe the same idea: letting a model invoke a function you have defined and use the result in its answer. Robofy's Function Tool Call is that capability applied to your own HTTPS APIs, with the builder, the mandatory pre-save test, the encrypted credential store and the security guardrails wrapped around it. If you have used function calling through a model provider's API directly, the concept is identical; the difference is that here you don't write or host the calling code.

Build More Than a Chatbot

Your AI agent should not stop at “I understand what you need.”

With function tool calling, it can move to “I’ve done it for you.”

Build Your AI Agent Free

Connect your first API in minutes. Tools are tested before they go live.

Start Free Book a Demo