Creating Custom Tools

Creating custom tools in NetSuite lets you automate tasks and extend the platform’s capabilities. In a few steps, you can define your tool's functionality, specify the actions it can perform, and configure it to work well with external AI clients. Building a custom tool gives you the flexibility to tailor solutions for data retrieval, process automation, or smarter integrations. The process is straightforward and helps you get started quickly, even if you’re new to custom tool scripts.

To begin creating your custom tool, follow these steps:

Procedure

Relevant Help Topic

Step One: Enable the necessary features in your NetSuite account:

  • Server SuiteScript

  • OAuth 2.0

  • SuiteCloud Development Framework (SDK)

Enabling SuiteScript

Enable the OAuth 2.0 Feature

SuiteCloud Development Framework Setup

Step Two: Set up your preferred SuiteCloud SDK Tools

Choose a supported IDE and set up the right SuiteCloud plug-in or extension. If you prefer a different IDE, the CLI tools can be used from your terminal.

SuiteCloud Plug-ins and Extensions

SuiteCloud CLIs

Step Three: Create a SuiteCloud project using either a SuiteApp or an Account Customization Project.

Important:

If you will be using an ACP instead of a SuiteApp to implement your custom tools, set the exposeto3rdpartyagent=F in the SDF Object XML to undeploy the tool.

SuiteCloud Project Types

Step Four: Write your custom tool script.

Custom tool scripts don’t have predefined entry points, so you must define all tool entry points in a single script.

SuiteScript 2.1 Custom Tool Script Type Code Samples

Step Five: Define your tools in a JSON schema file.

Important:

The method name and description for each tool help the AI client decide the tool's purpose and when it should be used.

SuiteScript 2.1 Custom Tool Script Type Reference

SuiteScript 2.1 Custom Tool Script Type Code Samples

Step Six: Create the SDF Object XML for your tool.

In the SDF object XML, set the file paths for the script and schema, configure tool exposure for AI clients, and define record permissions.

SuiteScript 2.1 Custom Tool Script Type Code Samples

Custom Record Type Object Permissions

Step Seven: When your tool is ready, deploy the SuiteCloud project to your NetSuite account.

--

Step Eight: In NetSuite, set up a role to be used with the NetSuite AI Connector.

Required Features and Permissions

Step Nine: From your AI Client, connect to the NetSuite AI Connector.

After integration, your external AI client should list the deployed tools from your NetSuite account.

Connect to NetSuite AI Connector Service

Step Ten: Invoke the tools using natural language prompts.

--

General Notices