Custom Tool Scripts as XML Definitions
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 tool
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 implementation in the SDF project must have a corresponding
tool
object definition XML file in the Objects folder. -
The specified value for
scriptid
in 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 execute 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 tool
SDF custom object, see tool.
Example of a Custom Tool Script Object
The following sample shows a custom tool object named Report Tool
that references a custom tool script file named report.js
and a custom tool JSON schema file named report_schema.json
.
<tool scriptid="customtool_reports">
<name>Report Tool</name>
<scriptfile>[/SuiteApps/com.netsuite.tools/tools/report.js]</scriptfile>
<rpcschema>[/SuiteApps/com.netsuite.tools/tools/report_schema.json]</rpcschema>
<exposeto3rdpartyagents>T</exposeto3rdpartyagents>
<permissions>
<permission>
<permkey>LIST_EMAILTEMPLATE</permkey>
<permlevel>FULL</permlevel>
</permission>
<permission>
<permkey>ADMI_CRMLIST</permkey>
<permlevel>VIEW</permlevel>
</permission>
</permissions>
</tool>
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