Create tools
Creating the tools
A tool is a function that an agent can use to carry out actions like calling external APIs or looking up information in a data source, as part of following the instructions defined in the prompt. In this tutorial, we will create five Tools to interface with our Shopify proxy-service APIs and data sources.
If you are using the built-in Syllable Shopify Tools, you can skip this step.
Before we begin you will need:
- Your Shopify store name (id)
- Your proxy-service URL and endpoints
As we create Tools, replace the store_name and endpoint URLs with your versions of both.
Click “Tools” on the left sidebar. This will take you to a list of the existing tools for your org. You’ll notice that there are many existing already - this is because Syllable comes with a standard set of tools out of the box. To create a new one, click “New tool” in the top-right corner.
get_shopify_order_by_number
This tool will use an order_number to retrieve order information from the Shopify API. Use the following tool schema to create your tool. Replace the endpoint url with your own service’s URL (or keep ours to test your tool), and the default static parameter value for store_name with your Shopify store name.
get_shopify_order_by_email_confirmation
This tool will retrieve order information using a combination of order confirmation number and the user email address. Use the following schema to create your tool. Replace the endpoint url with your own service’s URL (or keep ours to test your tool), and the default static parameter value for store_name with your Shopify store name.
get_shopify_products
This tool will retrieve product information using either product_id or a search term (product_name). Use the following schema to create your tool. Replace the endpoint url with your own service’s URL (or keep ours to test your tool), and the default static parameter value for store_name with your Shopify store name.
general_shopify_store_information
This tool will be used to access the data source we created to answer general questions about the store and its policies. Be sure the default static parameter value matches the name of your data source. Do not change the helix search URL.
get_shopify_product_url
This tool will use a provided product_handle to programmatically generate the URL to view a product in your Shopify store. Use the following tool schema to create your tool. Replace the endpoint url with your own service’s URL (or keep ours to test your tool), and the default static parameter value for store_name with your Shopify store name.
We have one more step before we’re able to create the agent, and that’s to add a greeting message for the agent to deliver to the user at the beginning of a conversation. Click “Create a message” to continue the tutorial.