Custom Tool Script Requirements
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).
After updating, redeploying, and running your custom tools, execution logs will be available on the Script Execution Logs page (Customization > Scripting > Script Execution Logs).
In NetSuite, creating your own tool requires the following:
-
Custom Tool Script File - Contains the SuiteScript code for your tool. Each method in the script can be defined as a separate tool in the tool schema. For guidance on writing code and structuring your custom tool scripts effectively, see Custom Tool Script Best Practices.
Important:The N/http, N/https, N/llm, and N/sftp modules are not supported in custom tool scripts.
Custom tool scripts must have the following:
-
The script header must include the JSDoc tag
@NScriptType CustomTool. -
Entry point functions for each tool method must be declared as asynchronous.
-
-
Custom Tool JSON Schema - A JSON file that defines all properties for the actions in your custom tool. For information about the properties defined in the tool schema, see Custom Tool JSON Schema.
-
Toolset SDF Object - The SDF object XML definition file associated with the custom tool script. In SuiteCloud Developmenent Framework (SDF), custom tools are defined as toolset SDF custom objects. For more information, see Custom Tool Scripts as XML Definitions.
For complete samples of each file, see SuiteScript 2.1 Custom Tool Script Type Code Samples.
For an end-to-end procedure (including deployment and connecting an AI client), see Creating Custom Tools for the NetSuite AI Connector Service.