Custom Tool Scripts as XML Definitions

Important:

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:

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

General Notices