Creating Custom Tools for the NetSuite AI Connector Service
With custom tools, you can automate tasks and extend NetSuite's capabilities. Custom tool scripts let you define the operations a tool can perform and configure it to work with external AI clients that support the Model Context Protocol (MCP). With custom tools, you can build solutions for data retrieval, process automation, and integration with AI clients. For information about the custom tool script type, see SuiteScript 2.1 Custom Tool Script Type.
NetSuite also supports MCP Apps, which enable you to build custom tools with interactive user interfaces. With MCP App support, your custom tool can provide a bundled HTML UI that is rendered directly in compatible AI chat clients, allowing for richer and more dynamic workflows. For more information, see Building MCP Apps (Interactive UI) with Custom Tools.
This topic outlines the workflow for developing and deploying custom tools using SuiteScript and the SuiteCloud Development Framework (SDF).
You can also find sample implementations of custom tools in the MCP-Sample-Tools directory of the SuiteCloud Project Repository on Oracle Samples GitHub.
Prerequisites for Custom Tools
Before you can start developing custom tools, ensure that you've set up the following prerequisites in your NetSuite account.
|
Required Tools and Features |
Related Help Topic |
|---|---|
|
Enable the necessary features in your NetSuite account:
|
|
|
Set up your preferred SuiteCloud SDK Tools. Choose a supported IDE and set up the appropriate SuiteCloud plug-in or extension. If you prefer a different IDE, you can use the CLI tools from your terminal. |
|
|
Set up a role to be used with the NetSuite AI Connector Service. |
Creating Custom Tools
The following table shows the workflow for creating, deploying, and using custom tools with the NetSuite AI Connector:
|
Procedure |
Related Help Topic |
|---|---|
|
Step 1: Create a SuiteCloud project. Use either a SuiteApp project or an account customization project (ACP). |
|
|
Step 2: Write your custom tool script using SuiteScript 2.1. Include the |
|
|
Step 3: Define your tools in a JSON-RPC schema file. Specify each tool's name, description, and input parameters. The name must match a method returned by your custom tool script. Use descriptions that explain what the tool does and when to call it. If you want to add an interactive UI (MCP App) to your custom tool:
|
|
|
Step 4: Create the SDF Set the file paths to the script and schema files, configure tool exposure settings, and define the permissions required to view the tool in AI clients. |
|
|
Step 5: Deploy the SuiteCloud project to your NetSuite account using your SuiteCloud SDK tools.
Important:
When you deploy a SuiteApp or account customization project (ACP) that includes a custom tool, you can't edit the custom tool script file, JSON-RPC schema file, or HTML resource file in the File Cabinet. You can edit these files only through SuiteCloud Development Framework (SDF). |
|
|
Step 6: 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. |
|
|
Step 7: Invoke the tools using natural language prompts. |
- |
Viewing and Deleting Custom Tools
You can view the tools available in your NetSuite account by going to Customization > Scripting > Custom Tools. This page displays tools from SuiteApps and ACPs, organized by toolset. You can delete toolsets that are part of ACPs directly from this page by clicking the delete icon for the toolset. For more information, see Managing Custom Tools in NetSuite.
To remove toolsets that are part of SuiteApps, you need to uninstall the SuiteApp. For more information, see Viewing and Uninstalling SDF SuiteApps in a NetSuite Account.