# Complete Examples (/tools/examples)











































## Get Current Time

The tool allows the Agent to retrieve the current date & time during a conversation. <br />
This is helpful when the Agent needs accurate, real-time information, such as:<br />

* Scheduling appointments
* Confirming business hours
* Providing time-based responses (e.g., “today”, “tomorrow”, “in 2 hours”)
* Logging or timestamping actions

For more information about the API endpoint please refer to [https://time.now/developer#get-time-zone](https://time.now/developer#get-time-zone)

Note the usage of path parameters in curly braces.
<img alt="GetTimeGeneral" src={__img0} placeholder="blur" />

This API does not require authentication.
<img alt="GetTimeAuth" src={__img1} placeholder="blur" />

In this case we want to preset the location, that is why we are using **Static** pre-defined values in path parameters.
<img alt="GetTimeParams" src={__img2} placeholder="blur" />

No need for **Body** as we are using **GET** method.
<img alt="GetTimeBody" src={__img3} placeholder="blur" />

Note that **Dynamic** variable is used to safe the value.
<img alt="GetTimeVars" src={__img4} placeholder="blur" />

This tool is usefull at any phase, i.e. prior, during & post conversation.
<img alt="GetTimeAvailability" src={__img5} placeholder="blur" />

As all needed values are static and preset, the API response can be tested without providing any values.
<img alt="GetTimeResponse" src={__img6} placeholder="blur" />

***

## Get Calendar

The tool allows the Agent to retrieve calendar events from Microsoft Outlook using the Microsoft Graph API. <br />
This is useful when the Agent needs to access certain schedule before booking a meeting, for listing upcoming events and avoiding scheduling conflicts.

What to pay attention to?

* Authentication & permissions
* Time range
* Timezone handling

For more information about the API endpoint please refer to [https://learn.microsoft.com/en-us/graph/api/calendar-getschedule?view=graph-rest-1.0\&tabs=http](https://learn.microsoft.com/en-us/graph/api/calendar-getschedule?view=graph-rest-1.0\&tabs=http)

<img alt="GetCalGeneral" src={__img7} placeholder="blur" />

Access to calendar data requires proper Microsoft Graph authentication and user consent.
Authentication is setup amd managed within Envocal Vault.
Make sure to configure it correctly.
<img alt="GetCalAuth" src={__img8} placeholder="blur" />

Note that **Static** pre-defined value is set making this a static tool that always checks calendar availability for Viking. <br />
To enable more dynamic usage, **Agent** variable could be used, giving the Agent the task to set its value or <br />
**Dynamic** variable if we are expecting the value to be set run-time, perhaps by another tool or system.

<img alt="GetCalParams" src={__img9} placeholder="blur" />

Based on the API documentation, request body is used to specify time zone, start / end times and time interals. <br />
Using **Infer from JSON** enables quick & easy reuse of example code from the API documentation. <br />
<img alt="GetCalBody" src={__img10} placeholder="blur" />

To make the toole more dynamic, start / end times are **Agent** variables - expected to be populated within the conversation by the Agent.
<img alt="GetCalVars" src={__img11} placeholder="blur" />

The tool can only be available during convresation as it uses **Agent** variables.
<img alt="GetCalAvailability" src={__img12} placeholder="blur" />

To test the API response, values for **Agent** variables are needed.
<img alt="GetCalResponse" src={__img13} placeholder="blur" />

## Book appointment

The tool allows the agent to create a new calendar event in a  Microsoft Outlook calendar using Microsoft Graph.

What to pay attention to?

* Required details - Collect all necessary information before booking
* Availability - Check to avoid conflicts
* Timezone - Ensure the meeting is scheduled in the correct timezone
* Confirmation - Clearly confirm the details before creating the appointment

<img alt="BookGeneral" src={__img14} placeholder="blur" />

<img alt="BookAuth" src={__img15} placeholder="blur" />

<img alt="BookParams" src={__img16} placeholder="blur" />

<img alt="BookBody" src={__img17} placeholder="blur" />

<img alt="BookVars" src={__img18} placeholder="blur" />

This tool needs to be available **only** during conversation as it expects from the Agent to set the value during the conversation.
<img alt="BookAvailability" src={__img19} placeholder="blur" />

In this case, to complete the API response testing we need to provide values for the **Agent** variables which are set by the Agent during conversation.
<img alt="BookResponse" src={__img20} placeholder="blur" />
