Fetch neighboring countries using Tool Calling Snaps

This pipeline demonstrates how to generate a function, invoke the tool, and retrieve results to identify India's neighboring countries.

  1. Configure the JSON Generator Snap with the prompt in the Edit JSON field as follows:

    JSON Generator Snap Configuration

  2. Configure the Amazon Bedrock Function Generator Snap to define a function and provide the description as follows:

    Amazon Bedrock Function Generator Configuration

  3. Configure the Amazon Bedrock Converse API Tool Calling Snap as follows to fetch the get_borders tool:

    On validation, the Snap displays the toolUseID and the invoked tool in the second output.

    Amazon Bedrock Converse API Tool Calling Configuration Amazon Bedrock Converse API Tool Calling Output

    Amazon Bedrock Converse API Tool Calling Configuration


    Amazon Bedrock Converse API Tool Calling Output

  4. Configure the HTTP Client Snap to fetch country data from the Restcountries API using the specified URL.

    On validation, the Snap displays the related information for India.

    HTTP Client Snap Configuration HTTP Client Snap Output

    HTTP Client Snap Configuration


    HTTP Client Snap Output

  5. Configure the Amazon Bedrock Function Result Generator Snap to fetch the results with the required tool.

    On validation, the Snap displays the neighboring countries of India.

    Amazon Bedrock Function Result Generator Snap Configuration Amazon Bedrock Function Result Generator Snap Output

    Amazon Bedrock Function Result Generator Snap Configuration


    Amazon Bedrock Function Result Generator Snap Output

To successfully reuse pipelines:
  1. Download and import the pipeline into SnapLogic Platform.
  2. Configure Snap accounts, as applicable.
  3. Provide pipeline parameters, as applicable.