SuiteScript
NetSuite 2025.2
2026-07-23

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).

Affects:SuiteScript 2.1N/llm

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 in llm.ToolCall objects.
  • 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 the llm.ToolParameterType enum (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

  1. 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.
  2. Use llm.ToolParameterType enum values exclusively for the options.type property. Hard-coding raw strings may break if the enum is extended in future releases.
  3. Write clear descriptions. The options.description field directly influences how accurately the LLM populates the parameter. Treat it as prompt engineering—be explicit about format, constraints, and expected values.
  4. 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.
  5. 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/llm methods) likely does carry governance—Oracle’s docs are silent on that here, so verify independently.