1. Home
  2. Knowledge Base
  3. Artificial Intelligence (AI)
  4. AI for End Users
  5. Using Application Tool Functions in the AI Assistant

Using Application Tool Functions in the AI Assistant

A tool function is an optional feature that can be utilized within an AI Assistant in m-Power.

The purpose of the tool function is to provide the AI Assistant real-time information which can be utilized within the chat interactions, or even in behind-the-scenes workflow that the assistant is invoked from. Tool functions allows the developer to configure their AI Assistant application to interact with external data via any of the following options:

How to use a Tool Function?

To access the tool functions within your AI Assistant, navigate to the AI Studio and select your AI Assistant. Click “Add Tool” on the Assistant and select “Application”.

Why use a Tool Function?

As is often the case with AI tools, there is no one-way to utilize AI. The use case will depend entirely on your chatbot’s purpose. Here are a few examples that can help explain where tool functions come into play:

Example 1: An AI Assistant acts as a shopping chatbot, allowing end-users to add items to their cart. Before adding an item, the assistant must verify the current inventory in real-time. By providing the AI with a Multiple Row retrieval built over your product tables, it can accurately check live stock levels and ensure a product is actually available before updating the user’s cart.

Example 2: A helpdesk ticketing system uses an AI Assistant to automatically assign new tickets to the representative with the lightest workload. When a ticket is submitted, the AI triggers a Multiple Row retrieval to evaluate the current open ticket counts for each staff member. Once it identifies the individual with the fewest open tickets, the AI passes that decision back to the workflow to assign the ticket and update the database.

Example 3: Within an application displaying recent orders, a user can ask the embedded AI chatbot about a specific customer. The assistant then uses a Single Row retrieval to fetch and display the relevant customer details.

Walkthrough

In this documentation, we’ll follow Example 3 from the above section.

To understand why tool functions are so powerful, consider what happens when a user asks a chatbot for details about a specific customer. Even with a perfectly written system prompt, the AI inherently lacks access to your live database; it simply has no way of knowing your customer data. However, by providing a tool function, we bridge that gap. We give the AI the ability to securely query your database in real-time, instantly making it “smarter” and capable of delivering accurate, data-driven answers.

For this walkthrough, I have created an AI Assistant called “Orders.” Its purpose is to provide end-users with a chatbot that can tap into live data to answer questions about placed orders, customer information, and product inventory. I have embedded this chatbot into a multiple-row retrieval that displays all customer orders on the screen.

To give the AI the access it needs, a Single Row retrieval called Customer Details has been built over the customer master table. By assigning this application as a tool function, the chatbot can now actively query real-time customer information and provide meaningful details the moment a user asks about them.

1. Configuration

To add my tool function, I’ll select the ‘Add Tool’ option below:

The following modal to configure the tool function will appear, where I will select Application as the tool type, as shown in Figure 4.

When using “Application” as the tool type, either a Retrieval or Maintainer application can can be utilized. In this example, my single row retrieval, Customer Details, will be selected and configured.

The Tool Name is what is referenced in the System Prompt. The Display Name is friendly name shown in the chat activity bubble while this tool is running.

The information here will be passed to the LLM at runtime when the chat bot is utilized, and is responsible for providing the appropriate context as to what this function tool is used for.

Therefore, for best results, be sure to include an articulate an accurate Description.

As will often be the case, a tool function will need information passed in at runtime from the AI Assistant in order to query the right information at runtime.

Selecting the “Add Parameter” button will expand the Tool Parameters sections, where the necessary parameters can be defined, allowing the AI Assistant to pass values from the inputted message to the retrieval application I’ve selected.

When selecting a retrieval to be the source of the tool function, utilize the pulldown shown in Figure 5 to select the field from retrieval’s data model that the AI Assistant will pass a value directly into.

In this situation, the customer details retrieval will need to be passed a customer number to know which customer to search for, meaning that parameter must be mapped accordingly.

The parameter defined in Parameter Name is specific to the AI Assistant application, whereas the parameter name in the Map to Application Field needs to match up with the field in the looked up application (Customer Details), in order for the filtering to work correctly.

Take note of the “Exact Match” option as well. In this case, choosing exact will mean the parameter value is looked for exactly as-entered. In other situations where a character parameter is being defined, the other option of search will mean the parameter value is looked up via a contains relationship.

After saving the tool function, a new tool block will be branched off from the AI Assistant.

2. Introduce Tool to System Prompt

In the system prompt of my AI Assistant, the following guidelines have been provided, which as seen below provides additional context about the Customer_Details tool function.

#NOTES

1. The user can ask about a specific customer details by supply the customer number, in a numeric format of ######. For example, a customer number is 100001, 100002, 100003, etc. Use the "Customer_Details" tool function and pass the customer number to it.  

The user MUST supply a customer number prior to you returning information from the "Customer_Details" tool function. Return the information in a bullet point list. 

Adding this information to the system prompt should be considered supplemental information – as recall the description provided when configuring the tool function earlier will be passed to the LLM and provide the most immediate instruction as to what the tool function is utilized for. Learn more about writing a System Prompt here.

3. Runtime

At runtime, I can interact with the AI Assistant chat bot and test out my tool function call to the customer details retrieval.

Notice a customer number has been indicated in the tool function configuration and the system prompt as required, so the AI Assistant will appropriately ensure that this information is passed before any information is returned.

Updated on August 6, 2026

Was this article helpful?

Related Articles