Welcome to this comprehensive guide on Mid Call Tools in Kalimna. While the platform already includes basic mid-call functions, Mid Call Tools give you complete flexibility to connect your AI phone agents to any external API or system you use.
Mid Call Tools allow your AI assistant to perform actions during an active call—like saving a lead to your CRM, booking an appointment in your calendar, checking inventory in real-time, looking up customer data, or triggering internal workflows. All of this happens while the caller is still on the line, creating a seamless, efficient customer experience.
For businesses in Qatar, UAE, Saudi Arabia, Kuwait, Bahrain, and Oman running Arabic and English AI phone agents, Mid Call Tools transform your AI from a simple answering service into a fully integrated system that works with your existing business tools—whether it's Salesforce, HubSpot, Google Calendar, or your own custom systems.
What You'll Learn:
- What Mid Call Tools are and how they work
- How to create custom tools with proper naming conventions
- How to configure endpoints, methods, and timeouts
- How to add headers for API authentication
- How to define parameters the AI will collect
- Best practices and real-world use cases for Gulf businesses
Watch the Mid Call Tools Tutorial
Follow along with this step-by-step video to see Mid Call Tools in action:
💡 Tip: Watch the video while following the written steps below.
What Are Mid Call Tools?
Mid Call Tools are custom functions that your AI assistant can execute during a live conversation. They enable the assistant to connect to external APIs to fetch information or trigger actions without human intervention.
Basic Mid-Call Functions vs. Mid Call Tools
Kalimna already provides some built-in mid-call functions in the Assistants tab. However, Mid Call Tools give you full flexibility to:
- Connect to any external API your business uses
- Define custom logic and parameters specific to your workflows
- Integrate with proprietary or custom-built systems
- Handle complex data exchanges during calls
Real-World Examples:
CRM Integration:
Create a tool called create_lead that saves customer contact details to Salesforce or HubSpot while the call is happening.
Calendar Booking:
Create check_availability to query your calendar API and book_appointment to schedule meetings in real-time.
Inventory Checks:
Create check_stock to verify product availability in your inventory system before confirming orders.
Customer Lookup:
Create get_customer_info to retrieve account details from your database using phone number or customer ID.
🌍 Gulf Region Example:
A medical clinic in Riyadh uses a Mid Call Tool to check doctor availability in their booking system. When a patient calls in Arabic asking for an appointment, the AI agent queries the calendar API mid-call, confirms an available slot, and books it immediately—all before the call ends.
Step 1 – Open the Mid Call Tools Section
To get started, log into your Kalimna dashboard and locate Mid Call Tools in the left-side navigation menu. Click it to open the Mid Call Tools management area.
This is where all your custom tools live. If you're new, the list will be empty—you're about to create your first tool.
Step 2 – Create a New Mid Call Tool
Click the "Create" button to open the tool creation window. This form has several sections where you'll configure how your tool works:
- Name – What the tool is called
- Description – What it does and when to use it
- Endpoint – Where API requests are sent
- Timeout – How long to wait for a response
- Method – Type of HTTP request (GET, POST, etc.)
- Headers – Authentication and format information
- Parameters – Inputs the tool needs
Don't worry if this seems technical—we'll walk through each part step by step.
Step 3 – Name Your Tool Correctly
The tool name is how your AI assistant recognizes and calls the tool during conversations. Naming conventions are critical.
Naming Rules:
- Use lowercase only (no capitals)
- Use underscores for spaces (not hyphens or spaces)
- Be descriptive (the name should explain what the tool does)
Good examples:
get_weather– retrieves weather datacreate_lead– creates a new lead in CRMbook_appointment– schedules an appointmentcheck_availability– checks calendar availabilityupdate_customer_email– updates email in database
Bad examples:
CreateLead(has capitals)check-availability(uses hyphens instead of underscores)tool1(not descriptive)
✨ Why This Matters:
The AI assistant references tools by this exact name inside prompts and conversation logic. Using the correct format ensures the assistant can reliably call the right tool at the right time.
Step 4 – Add a Clear Tool Description
The description explains to the AI what the tool does and when to use it. The more specific and clear you are, the better the assistant understands when to call the tool during a conversation.
What to Include in Your Description:
- What the tool does (the action it performs)
- When to use it (the conditions or trigger points)
- What inputs are needed (parameters required)
Good description examples:
- "Use this tool to create a new lead in the CRM when the caller has provided their full name, phone number, and email address."
- "Check calendar availability for the requested date and time before confirming an appointment with the customer."
- "Retrieve customer account information from the database using their phone number to personalize the conversation."
- "Book an appointment in the calendar system once the customer has confirmed the date, time, and service type."
💡 Pro Tip:
Include specific conditions in your description. Instead of "creates a lead," write "creates a lead when the caller has provided name, phone, and email." This prevents the tool from being called prematurely with incomplete information.
Step 5 – Configure the Endpoint and Timeout
Endpoint (API URL)
The endpoint is the API address where the request will be sent. This could be:
- Your CRM's API endpoint (e.g.,
https://api.hubspot.com/contacts/v1/contact) - Your calendar system's API (e.g.,
https://api.calendly.com/scheduled_events) - Your own internal API (e.g.,
https://yourcompany.com/api/leads) - Third-party services (weather APIs, shipping APIs, etc.)
You'll find the correct endpoint URL in your API provider's documentation.
Timeout
The timeout controls how long (in seconds) the assistant will wait for a response from the endpoint before giving up.
- Too short (e.g., 2 seconds): The tool might timeout before slow APIs respond, causing failures.
- Too long (e.g., 30 seconds): The caller waits in awkward silence if the API is slow or down.
- Just right (5-10 seconds): Balances reliability with user experience.
Recommended: Start with 8-10 seconds. If your API is consistently fast (under 2 seconds), you can lower it. If it's occasionally slow, increase it slightly.
Step 6 – Choose the HTTP Method (GET, POST, PUT, PATCH, DELETE)
The HTTP method tells the API what kind of action you want to perform. Here's what each method does, explained in simple terms:
GET – Retrieve Data
Use when: You want to fetch/read information without changing anything.
- Check available appointment time slots
- Look up customer information by phone number
- Get current weather data
- Retrieve product details or pricing
POST – Create Something New
Use when: You want to create a new record or entry.
- Create a new lead in your CRM
- Book a new appointment
- Submit a support ticket
- Add a new customer to your database
PUT – Replace Existing Data
Use when: You want to completely replace an existing record.
- Replace all details of a customer record
- Update an entire appointment (all fields)
PATCH – Update Parts of Existing Data
Use when: You want to update only specific fields without replacing everything.
- Change only the customer's email address
- Update just the appointment time (keeping date and other details)
- Modify a single field in a lead record
DELETE – Remove Data
Use when: You want to delete a record or cancel something.
- Cancel an appointment
- Remove a lead from the system
- Delete a temporary entry
💡 Most Common Methods:
For most business use cases, you'll primarily use GET (to check/retrieve data) and POST (to create leads, bookings, etc.). PATCH, PUT, and DELETE are less common but useful for specific scenarios.
Step 7 – Add Headers (Content-Type, Authorization, etc.)
Headers are extra pieces of information sent with each API request. Think of them like notes on an envelope that tell the API how to interpret and process your request.
Common Headers:
1. Content-Type
Tells the API what format the data is in. Most modern APIs use JSON.
- Header name:
Content-Type - Value:
application/json
2. Authorization
Provides authentication credentials so the API knows you're allowed to access it.
- Header name:
Authorization - Value:
Bearer YOUR_API_TOKEN
(Replace YOUR_API_TOKEN with your actual API key from the service)
How to Add/Remove Headers:
- Click "Add header" to create a new header row
- Enter the header name (e.g.,
Content-Type) - Enter the header value (e.g.,
application/json) - To remove a header, click the trash icon next to it
📘 Where to Find Header Requirements:
Check your API provider's documentation (Salesforce, HubSpot, Google Calendar, etc.) to see which headers are required. Most will explicitly list the headers needed for authentication and data format.
Step 8 – Define Tool Parameters
Parameters are the inputs your assistant needs to collect from the caller before calling the tool. These become the data sent to your API.
Understanding Parameters:
For example, if you're creating a book_appointment tool, you might need parameters like:
customer_name(string) – The caller's full namephone_number(string) – Contact numberappointment_date(string) – Preferred dateappointment_time(string) – Preferred timeservice_type(string) – What service they need
Important Behavior:
Here's the magic: If a required parameter is missing, the assistant will automatically ask the caller for it.
For example, if the caller says "I want to book an appointment" without mentioning a date, and appointment_date is a required parameter, the AI will naturally ask: "What date would you prefer for your appointment?"
How to Add Parameters:
- Click "Add parameter"
- Enter the parameter name (e.g.,
customer_email) - Choose the type if applicable (string, number, boolean)
- Mark whether it's required or optional
- Add a description explaining what this parameter is
✨ Best Practice:
Only mark parameters as required if they're absolutely necessary for the API call to work. Optional parameters give the assistant flexibility to work with partial information.
Step 9 – Save Your Tool (Create vs Create and Create Another)
At the bottom of the form, you have three action buttons:
Create
Saves the tool and returns you to the Mid Call Tools overview. Use this when you're creating a single tool or finishing up.
Create and Create Another
Saves the current tool and immediately opens a blank form to create another one. Perfect when you're setting up multiple related tools in one session.
Example: If you're building a complete booking system, you might create:
check_availabilitybook_appointmentcancel_appointmentreschedule_appointment
Using "Create and create another" lets you add all four without navigating back and forth.
Cancel
Exits without saving any changes. Use this if you made a mistake or changed your mind.
Once saved, the tool becomes available to your AI assistants. You'll need to reference it in your assistant's prompt or system instructions so the AI knows when to use it.
Best Practices and Example Use Cases
Best Practices:
- Keep names and descriptions clear: Future you (or your team) should instantly understand what each tool does.
- Start small: Create 1-2 tools first and test them thoroughly before building a full suite.
- Ensure endpoint stability: Make sure your APIs are reliable and respond consistently within the timeout period.
- Protect sensitive endpoints: Always use proper authentication (bearer tokens, API keys) to prevent unauthorized access.
- Test with real scenarios: After creating a tool, test it with your AI agent to ensure it works as expected in actual conversations.
- Monitor API usage: Keep track of how often tools are called to avoid hitting API rate limits.
Gulf-Focused Use Cases:
Medical Clinics (Doha, Dubai, Riyadh):
- •
check_doctor_availability– Check which doctors are available - •
book_consultation– Create appointment in clinic system - •
update_patient_contact– Update patient phone/email - •
verify_insurance– Check insurance coverage
Real Estate (Dubai, Kuwait City, Manama):
- •
create_property_inquiry– Save lead to CRM - •
schedule_viewing– Book property viewing - •
check_property_availability– Verify if property is still available - •
update_lead_status– Mark lead as qualified/interested
Restaurants (Riyadh, Muscat, Abu Dhabi):
- •
create_reservation– Book table in reservation system - •
check_table_availability– See if tables are available - •
update_reservation– Modify existing booking - •
submit_delivery_order– Send order to kitchen/delivery system
E-commerce (Kuwait, Bahrain, Oman):
- •
check_order_status– Look up order in system - •
check_stock– Verify product availability - •
create_support_ticket– Submit customer issue - •
update_shipping_address– Modify delivery details
What's Next?
You now know how to create powerful Mid Call Tools that connect your AI phone agents to external systems. Your agents can now interact with CRMs, calendars, databases, and any API you use—all during live conversations.
Recommended Next Steps:
🧪 Test Your Tools
Use "Test agent" or "Speak to assistant" features to verify your Mid Call Tools work correctly before going live.
View Testing Guide →📚 Knowledge Base
Combine Mid Call Tools with a Knowledge Base so your AI agents can both retrieve static information and perform dynamic actions.
View Guide →📊 Monitor Tool Usage
Review call transcripts to see when and how tools are being called, and optimize based on real usage patterns.
Guide coming soon
🔗 Post-Call Webhooks
Combine Mid Call Tools (during calls) with post-call webhooks (after calls) for complete workflow automation.
Guide coming soon
Ready to Integrate Your Systems?
Whether you run a clinic in Doha, a real estate agency in Dubai, a restaurant in Riyadh, a hotel in Jeddah, or an e-commerce brand in Kuwait City, Manama, or Muscat—Mid Call Tools help your Arabic and English AI phone agents do real work with your CRM, calendar, and internal systems.