> For the complete documentation index, see [llms.txt](https://doc.firstbot.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.firstbot.tech/tutorials/engine/building-a-custom-tool.md).

# Building a custom Tool

<figure><img src="/files/0KAWqq4o79fWMNKqZDYN" alt="" width="340"><figcaption><p>Node with a cusotm tool</p></figcaption></figure>

{% embed url="<https://youtu.be/JUVEYNp0coE>" %}

## Step by step instructions

{% tabs %}
{% tab title="Create a node" %}

### Create a new node and press "Set Tool"&#x20;

<div align="center"><figure><img src="/files/cMwLgAlz0L5eKdp6dMJ3" alt="" width="188"><figcaption></figcaption></figure></div>

### In the "Script" section, under "Type", choose "Node.js"&#x20;

<figure><img src="/files/8nGz9V3c8yaPpNuslvT6" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Write the script" %}

### Input your node.js code

<div align="center"><figure><img src="/files/5Xv9xbWbW0YsNM2tv3Nt" alt="" width="375"><figcaption></figcaption></figure></div>

Dependencies: \
Empty&#x20;

Script:

{% code overflow="wrap" %}

```javascript
async function exeFunc({ timeZone }) {
return new Date().toLocaleString("en-US", { timeZone: timeZone })
}
```

{% endcode %}

Properties:

{% code overflow="wrap" %}

```javascript
{
"timeZone": {
"type": "string",
"description": "Use the given timezone to format a new time e.g., 'Asia/Tokyo'. The value cannot be UTC."
}
}
```

{% endcode %}

### Press "Next"

{% endtab %}

{% tab title="Configurations" %}

### Input name and description

<figure><img src="/files/700HKcFCohwLvsFkCOes" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Publish your tool&#x20;

{% content-ref url="/pages/4mecfxOOGZSWpNY2LHyK" %}
[Publish a tool](/tutorials/engine/publish-a-tool.md)
{% endcontent-ref %}
