Creating Tools
Overview
This tutorial explains how to create Tools in the Infor GenAI Factory. Tools are the fundamental building blocks that allow GenAI agents to interact with APIs exposed through the API Gateway.
Before an agent can perform actions like searching for users, retrieving profile information, or updating records, the required tools must be created and configured.
The video demonstrates three tool types:
- Search Tool (Search Users)
- Finds users based on partial information.
- Returns one or more matching users.
- Get Tool (Get Current User)
- Retrieves details about the current user.
- Typically returns a single result.
- Update Tool (Update User Profile)
- Modifies user data.
- Performs actions against live systems.
📋 Requirements
Access Requirements
- Access to the Infor GenAI Application
- Permissions to use the GenAI Factory (See requirements in GenAI Factory Introduction for security roles)
- Access to APIs published in the API Gateway
- Access to the API Suite that will be used by the tool
Tutorial
A tool is the builing block that lets an agent take action by calling an API exposed on the API Gateway.
Create a search tool
Before starting, make sure the API you want to use is already published in the API gateway. Since the tool draws its functionality from an API suite, you'll also need access to the Gen AI application and permission to work in the factory as well as access to the APIs on the gateway that the tool will call. This example will use the IFS Service api.
- Navigate to the GenAI Application, to the Factory, then to Tools. You will see a list of tools available in the tenant.
- Define a new tool by clicking the add button.
- Give the tool a name. Best practices prefix the name with the application name it belogs to. Name your tool IFS_SearchUsersByFilter.
- Choose which model you wish to use. We will use Claude Haiku 4.5 for this example.
- Select a Manual Documentation type, and have the Enable Tool Status toggle on.
- Add the description. “Use this tool when user provides partial information to find users (e.g. ‘Find John Smith’, ‘Search for users in Sales’). This is the primary search tool - use it before other tools when you don't have a User GUID. ”
- Select the Source API. Find the IFS Service API Suite, and the ifsservice/ service path.
- Because we chose manual documentation, the API Request Instrcutions are visible. We'll document the path endpoint as such and the method as a post. This endpoint searches for users based on multiple filter criteria. It's how the assistant finds people when it only has partial information like a name or a department. From here, you'll see the rest of the instructions such as the search parameters, the filter properties, and the operators. There's also an example request body.
- Add the API Response Instructions from the module below.
Response Structure:
{
"response": {
"startIndex": 0,
"count": 100,
"totalResults": 1,
"userlist": [
{
"id": "[user GUID]",
"userName": "[email address]",
"name": {
"familyName": "[last name]",
"givenName": "[first name]"
},
"displayName": "[display name]",
"emails": [
{
"value": "[email address]",
"type": "work",
"primary": true
}
],
"title": "[job title]",
"preferredLanguage": "[language code]",
"locale": "[locale code]",
"timezone": "[timezone name]",
"department": "[department]",
"status": "[Active / Inactive]",
"ifsPersonId": "[person GUID]",
"isServiceUser": "[true / false]"
}
]
},
"responsestatus": "[success / error]",
"errorlist": []
}
Key Fields to Extract:
User GUID: response.userlist[0].id (the user's unique identifier, used to act on the user in subsequent Tool calls)
Full Name: response.userlist[0].name.givenName + response.userlist[0].name.familyName
Email: response.userlist[0].emails[0].value
Display Name: response.userlist[0].displayName
Title: response.userlist[0].title
Status: response.userlist[0].status
Preferred Language: response.userlist[0].preferredLanguage
USAGE RULES
Use response.userlist[0].id as the User GUID when passing to other Tools that require a user identifier.
Check totalResults before acting. If totalResults is 0 the search returned no matches. Ask the user to refine their search criteria.
If multiple results are returned, present the list to the user and ask them to confirm which user to act on before proceeding.
ERROR HANDLING
400 -> Bad request. Action: Check that the filter properties and operators are correctly formatted.
401 -> Unauthorized. Action: Confirm the user's session is active and they have access to the endpoint.
404 -> No users found. Action: Ask the user to provide different search criteria and try again.
Click save. You should now see your tool in the tool list.
On this page
- Creating Tools