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. The script must return every method defined as a tool in the JSON-RPC 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.
Ensure that all other required modules can be loaded during deployment. References to missing modules can cause deployment to fail.
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-RPC Schema - A JSON file that defines one or more custom tools in your toolset. Each tool definition identifies the name of a method that your custom tool script returns and describes how AI clients can invoke the tool. For information about the properties defined in the JSON-RPC schema, see Custom Tool JSON-RPC Schema.
-
Toolset SDF Object - The SDF object XML definition file associates a custom tool script file with a JSON-RPC schema file. It also defines properties for the toolset, such as permissions. In SuiteCloud Development Framework (SDF), custom tools are defined as toolset SDF custom objects. For more information, see Custom Tool Scripts as XML Definitions.
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).
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.
You can also build custom tools with interactive UI using the MCP App framework. For more information, see Building MCP Apps (Interactive UI) with Custom Tools.