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 the SnapLogic Platform.
  2. Configure Snap accounts, as applicable.
  3. Provide pipeline parameters, as applicable.