# Creating a Custom Tool

### **Step 1: Start from UCL Setup**

* Go to the **Connect** section in your UCL Workspace.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2F68vMmDLPElvI58ThzfK0%2Fimage.png?alt=media&#x26;token=2a6ef13e-003a-4d3c-9953-08c7562f1a65" alt=""><figcaption></figcaption></figure>

* Click **“Define a Custom App”** to launch the **App Builder Assistant** chat.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2F328dQhPTReWb2nVxLGMJ%2Fimage.png?alt=media&#x26;token=eaa98b5a-3c4b-48b2-ab24-bd3a2690f7a4" alt=""><figcaption></figcaption></figure>

### **Step 2: Create a Tool via Prompt**

Type a natural language prompt like:

> *“Create a tool for Google Cloud Storage.”*

The assistant may detect existing tooland ask where to add this app. For example:

> *Would you like to add the Google Cloud Storage tool under one of these, or shall I create a new group (e.g., “GoogleCloudStorage” with OAuth2 authentication)?*

You respond:

> *“Create a new group.”*

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fmqig2o5gE4SEZWInZNiL%2Fimage.png?alt=media&#x26;token=d9b6da9e-426b-4e71-8373-586ff06cf0d8" alt=""><figcaption></figcaption></figure>

ℹ️ **Want to add to an existing tool instead?**\
Click **“Add to Existing Tool”** and select the tool you'd like to edit or extend with new toolkits.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2F3BJS7hbI8asr5LOlE9WR%2Fimage.png?alt=media&#x26;token=e1205db7-1584-43a4-978d-d85054023701" alt=""><figcaption></figcaption></figure>

### **Step 3: Confirm OAuth2 Authentication Setup**

The assistant will suggest an OAuth2 setup for the new tool:

```json
{
  "baseUrl": "https://accounts.google.com/o/oauth2/auth",
  "clientId": "",
  "secret": "",
  "params": {
    "scope": "https://www.googleapis.com/auth/devstorage.read_write",
    "response_type": "code",
    "access_type": "offline",
    "prompt": "consent"
  },
  "requiredAttributes": [],
  "tenantId": "default",
  "authorization": {
    "oauthGrantType": "authCodeGrantWithGrantType",
    "accessTokenUrl": "https://oauth2.googleapis.com/token",
    "refreshTokenGrantType": "refreshTokenWithAccessType"
  }
}
```

Confirm when prompted:

> *“Yes.”*

The assistant will respond:

> *“The ‘GoogleCloudStorage’ group is ready.”*

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FCDR1EAZC1rJnoTj0NIm8%2Fimage.png?alt=media&#x26;token=cab8457c-92a3-43ce-8063-89b020f57887" alt=""><figcaption></figcaption></figure>

### **Step 4: Add Actions to the Tool**

The assistant will suggest actions to expose:

> *Which GCS operation would you like to expose first as a tool? For example:*

* `listBuckets`
* `getBucketMetadata`
* `createBucket`
* `deleteBucket`
* `listObjects`
* `uploadObject`
* `downloadObject`
* `deleteObject`

You can respond:

> *“Add createBucket and listObjects.”*

You’ll then receive:

> *The tools “createBucket” and “listObjects” have been created successfully in the “GoogleCloudStorage” group. You can now use them in your workflows.*

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2F6GMfqReqc1BaJvdbyceZ%2Fimage.png?alt=media&#x26;token=ba0e05f1-6aaf-4b47-a314-4be17bd965e7" alt=""><figcaption></figcaption></figure>

### **Step 5: Finalize Setup in the Tools Section**

* Navigate to the **Tools** section in your UCL project.
* Under **Workspace Tools**, find the newly created **GoogleCloudStorage** group.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FOi3ZQsCg4oeWkDpuwrpI%2Fimage.png?alt=media&#x26;token=a8ae77cc-efee-45ef-8131-f5f120d99ad6" alt=""><figcaption></figcaption></figure>

* Click the **three dots menu** > **Edit**, and fill in the `clientId` and `secret` using your Google Cloud credentials.
* Save the configuration.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Ftzaa5EWvzZ2NzBjxbme8%2Fimage.png?alt=media&#x26;token=ad31342a-e5e8-4e7c-b9de-a25191e910e5" alt=""><figcaption></figcaption></figure>

### **Step 6: Connect and Test with AI Agent**

* Now go back to the **Setup** section.
* Search for your **GoogleCloudStorage** tool group and **Connect** the app by authenticating your Google account.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FVDP6DUDVy8qaLaYBz9Lq%2Fimage.png?alt=media&#x26;token=01a4ea81-edf3-4f19-ae9f-eaf971f2a2ff" alt=""><figcaption></figcaption></figure>

* Once connected, select any of the added actions (like `createBucket` or `listObjects`).

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2F9DfcXSNAREq6b42rosiP%2Fimage.png?alt=media&#x26;token=884c8dd6-00c4-4d6c-ba11-58c5f12eee08" alt=""><figcaption></figcaption></figure>

* Use the AI Agent to test your tool with a natural command:

  > *“Create a bucket in my Google Cloud Storage.”*

#### Additional Prompt Ideas for creating Custom Tool

* “Create a tool for a fitness tracking app like Strava.”
* “Build a tool that pulls ticket data from our in-house Jira instance.”
* “Set up a custom tool for a REST API with POST and GET methods.”
