llm.createToolParameter(options)

Note:

The content in this help topic pertains to SuiteScript 2.1.

Method Description

Creates a tool parameter that you can provide when creating a tool using llm.createTool(options).

Tool parameters define the individual input values that the large language model (LLM) must provide when requesting a tool call. These parameters help the LLM understand how to call the tool accurately and ensure that tool call requests include all necessary and correctly typed data for the tool handler logic.

After you create a tool parameter, you can provide it to llm.createTool(options) using the options.parameters parameter. You can create and provide as many tool parameters as your tool requires.

Returns

llm.ToolParameter

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/llm Module

Since

2025.2

Parameters

Parameter

Type

Required / Optional

Description

Since

options.description

string

required

A description of what data the tool parameter represents.

This parameter helps the LLM prompt for and fill in the value correctly.

2025.2

options.name

string

required

A unique identifier for the tool parameter.

This parameter is used when the LLM refers to this specific input in tool call requests (which are represented as llm.ToolCall objects).

2025.2

options.type

string

required

The data type of the parameter.

This parameter ensures the LLM produces correctly typed values. Use values from the llm.ToolParameterType enum to set this parameter.

2025.2

Syntax

Important:

The following code sample shows the syntax for this member. It isn't a functional example. For a complete script example, see N/llm Module Script Samples.

            // Add additional code
...

const userNameParameter = llm.createToolParameter({
    name: "userName",
    description: "Name of the user",
    type: llm.ToolParameterType.STRING
});

...
// Add additional code 

          

Related Topics

General Notices