How to create a new tool and use it with a Teammate


What is ToolBuilder


In Workforce we have different types of tools available to use them with a teammate.

Please see the overview of available tools here


ToolBuilder feature allows users to create their own tools in case the existing tools don't match users' needs. It allows to use the existing tools actions as a part of custom user tool as well as add their own test actions

Currently only API action is available as a way to create a new test action. In future it's planned to add JSExecutor action


How to create a new Tool

  1. On Workforce site go to 'My Tools' menu
  2. Click on 'Add New' icon

Add new tool

  1. Provide Tool Name and Description. You can change them later.


  1. Tool Builder screen is opened. Tool consists of three parts: Inputs, Actions and Output Value. In Inputs section provide input fields for your tool. Click 'Add' button and choose the type of input. Tool input fields
  2. After input type is chosen provide a name for the field. It is recommended to follow best practices for tool name e.g. use camel case, give meaningful name. User is able to add as many inputs as needed. These inputs can be used as input fields for Actions.
  3. In Actions section click Add button to add action for your tool. Tool Actions
  4. For Actions user is able to choose from standard actions available on site such as Image Generator, Calculator etc. or build own action using 'API' action. After actions is chosen user needs to provide Action Name and input data for the action. Don't navigate from Action until all fields are filled in. There is validation which shows if fields were filled in incorrectly or left empty.
  5. If API action is selected then provide action name, endpoint URL, choose HTTP method. In Body area provide json with payload data. Headers section and parameters section are optional. If needed provide Headers and/or parameters using key/value pairs. To use Input field from the previous section in test action use handlebars {{myInput}} . The example below shows action which returns the number of population from public API with country data. In the example the input field is used as a part of url. Parameters section is used to get a specific field from API. Example of API action
  6. Once all required fields are provided 'Test' button is enabled. Use Test button to check each action separately. If there were handlebars expressions user needs to enter data manually for testing Test Tool
  7. Click Test and wait for the response from the Tool. Use different input data for testing or make adjustments into the action if needed.
  8. Add more actions if needed. Use input fields or the results of a previous action as inputs to the next action. In the example below user adds 'native' Calculator action and uses the result of API action as an input Native Tool Action
  9. Provide output value. It can be a response from tool action or part of it. Review 'Output Value' section below to learn how to use this field.
  10. Save the Tool by clicking Save button on the top right side.
  11. Test your tool as a whole by clicking 'Test Tool' button. Enter input fields to the tool manually. Test Tool
  12. After ensuring that the tool returns results as expected it's ready to be used in Teammate Builder. Go to My Teammates menu and create a new agent. In Allowed Tools section click Add to see the list of available tools. The newly created tool should be shown in the list of available tools. Agent Builder Select Tool
  13. Use the newly built tool the same way as native tools. Tool will be called if the provided request matches tool description

Using the created tool in agent chat dialog


Output Value


  • Use Action Name as Output Value to get the result of action as an output for the Tool.
  • Use JsonPath syntax to get the partial result from action. Example: getCountryPopulation.responseBody[0].population is a JsonPath expression used to get number as a result of action. Using action name getCountryPopulation without specifying the field would return the whole json which cannot be used in Calculator action.


The available results for each action are shown under action name in 'Actions' section of Tool Builder


Learn more about JsonPath syntax here

Updated on: 06/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!