N/llm Module: New createToolParameter Method for LLM Tool Calling
SuiteScript 2.1 gains llm.createToolParameter(options) in the N/llm module, letting server scripts define typed input parameters that an LLM must supply when it invokes a tool created via llm.createTool(options).
What changed
NetSuite 2025.2 adds llm.createToolParameter(options) to the N/llm module. This method creates a llm.ToolParameter object that describes a single input value an LLM must provide when requesting a tool call. You wire these parameters into a tool via the options.parameters property of llm.createTool(options).
Method details
- Module:
N/llm - Returns:
llm.ToolParameter - Governance: None
- Supported script types: Server scripts only (Scheduled, Map/Reduce, Suitelet, RESTlet, etc.)
Required parameters
options.name(string) — Unique identifier the LLM uses to reference this input inllm.ToolCallobjects.options.description(string) — Human-readable description that guides the LLM to prompt for and populate the value correctly.options.type(string) — Data type the LLM must produce. Set via thellm.ToolParameterTypeenum (e.g.,llm.ToolParameterType.STRING).
Example syntax
Below is the minimal pattern; see Oracle’s N/llm Module Script Samples for a full working script.
const userNameParameter = llm.createToolParameter({
name: "userName",
description: "Name of the user",
type: llm.ToolParameterType.STRING
});What to do
- Check your account version. This API is available only in 2025.2 and later. Confirm your target environment has been upgraded before deploying scripts that import
N/llm. - Use
llm.ToolParameterTypeenum values exclusively for theoptions.typeproperty. Hard-coding raw strings may break if the enum is extended in future releases. - Write clear descriptions. The
options.descriptionfield directly influences how accurately the LLM populates the parameter. Treat it as prompt engineering—be explicit about format, constraints, and expected values. - Server scripts only. Client scripts, user-event scripts, and other client-side types are not supported. Plan your architecture so LLM interactions run in Suitelets, RESTlets, Scheduled, or Map/Reduce scripts.
- No governance cost. Creating tool parameters does not consume governance units, so you can define as many parameters as a tool requires without budgeting extra units. Note that the overall LLM call itself (via other
N/llmmethods) likely does carry governance—Oracle’s docs are silent on that here, so verify independently.
Source: Oracle NetSuite Release Notes