Custom Tool Scripts as XML Definitions
NetSuite 2026.1 includes changes to the custom tool script type and its corresponding SDF object, enabling execution log support for custom tool scripts. To use this logging feature, new and existing custom tools must follow the updated specifications. For information about the changes, see How to Update Custom Tool Scripts for Execution Log Support in NetSuite 2026.1 (SuiteAnswers ID: 1024036).
Custom tool scripts let you build NetSuite tools that external AI clients can invoke through the NetSuite AI Connector Service. With these scripts, you can retrieve data, trigger actions, or perform most SuiteScript-supported operations from natural language prompts in your AI client.
Custom tools are implemented as part of SuiteCloud projects created using the SuiteCloud Development Framework (SDF). In SDF, custom tools are defined as a toolset SDF custom object.
For information about developing custom tools for the NetSuite AI Connector Service, see the following help topics:
Take note of the following guidelines when creating the XML definition file for custom tool SDF objects:
-
Each custom tool script in the SDF project must have a corresponding
toolsetobject definition XML file in the Objects folder. -
The specified value for
scriptidin the XML definition must match the file name of the custom tool object definition file. -
The permissions set in the custom tool object definition determine the visibility of the tool in the AI client. If the user has all of the permissions defined for the tool, the tool will be visible to them. However, access to data and the ability to run tool actions still depend on the user's NetSuite role and permissions. Users can only access data and perform operations that their NetSuite role allows, regardless of tool visibility.
For information about the attributes and fields in a toolset SDF custom object, see toolset.
Example of a Custom Tool Script Object
This sample shows a custom tool object named Report Tool that references a script file named report.js and a JSON schema file named report_schema.json.
The object definition XML file is named custtoolset_reports.xml.
<toolset scriptid="custtoolset_reports">
<name>Report Tool</name>
<scriptfile>[/SuiteApps/com.netsuite.tools/tools/report.js]</scriptfile>
<rpcschema>[/SuiteApps/com.netsuite.tools/tools/report_schema.json]</rpcschema>
<exposetoaiconnector>T</exposetoaiconnector>
<permissions>
<permission>
<permkey>LIST_EMAILTEMPLATE</permkey>
<permlevel>FULL</permlevel>
</permission>
<permission>
<permkey>ADMI_CRMLIST</permkey>
<permlevel>VIEW</permlevel>
</permission>
</permissions>
</toolset>
Related Topics
- Scripting
- User Event Scripts as XML Definitions
- Scheduled Scripts as XML Definitions
- SDF Installation Scripts as XML Definitions
- Workflows as XML Definitions
- Translation Collections as XML Definitions
- Map/Reduce Script Objects as XML Definitions
- Portlet Scripts as XML Definitions
- Client Scripts as XML Definitions
- Integration Records as XML Definitions
- Mass Update Scripts as XML Definitions
- Suitelet Scripts as XML Definitions
- RESTlet Scripts as XML Definitions
- Secrets as XML Definitions
- Single Page Applications as XML Definitions