Bryce Krah
09/23/2025, 3:43 PMShawn Talbert
09/23/2025, 3:57 PMoutputSchema
- for some reason the NS help seems to have been recently updated and mentions that is required for ChatGPTBryce Krah
09/23/2025, 5:28 PM{
"tools": [
{
"name": "getCurrentUser",
"description": "Provides information about the NetSuite user that is using the AI client.",
"inputSchema": {
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false,
"nullable": []
},
"outputSchema": {
"type": "object",
"properties": {
"id": {
"type": [
"string",
"number",
"null"
],
"description": "Internal ID"
},
"name": {
"type": [
"string",
"null"
],
"description": "User's name"
},
"email": {
"type": [
"string",
"null"
],
"description": "Email address"
},
"role": {
"type": [
"string",
"number",
"null"
],
"description": "Role or role ID"
},
"location": {
"type": [
"string",
"number",
"null"
],
"description": "Location ID"
},
"department": {
"type": [
"string",
"number",
"null"
],
"description": "Department ID"
},
"subsidiary": {
"type": [
"string",
"number",
"null"
],
"description": "Subsidiary ID"
},
"error": {
"type": [
"string",
"null"
],
"description": "Error message if execution fails"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false,
"nullable": [
"email",
"role",
"location",
"department",
"subsidiary",
"error"
]
},
"annotations": {
"title": "Get Current User",
"readOnlyHint": true,
"idempotentHint": true,
"openWorldHint": false
}
}
]
}
Mohammad Sharaf Ali
09/24/2025, 6:40 AMShawn Talbert
09/24/2025, 2:18 PMBryce Krah
09/24/2025, 2:34 PMMohammad Sharaf Ali
09/25/2025, 7:58 AMMohammad Sharaf Ali
09/25/2025, 8:12 AM{
"tools": [
{
"name": "add",
"description": "Add two numbers together",
"inputSchema": {
"type": "object",
"properties": {
"a": {
"type": "number",
"description": "First addend"
},
"b": {
"type": "number",
"description": "Second addend"
}
},
"required": [
"a",
"b"
],
"nullable": []
},
"outputSchema": {
"type": "object",
"properties": {
"result": {
"type": "number",
"description": "Value of adding the two input numbers"
},
"error": {
"type": "string",
"description": "Error message if execution fails"
}
},
"required": [
"result"
],
"nullable": [
"error"
]
},
"annotations": {
"title": "Add Numbers",
"readOnlyHint": true,
"idempotentHint": true,
"openWorldHint": false
}
}
]
}
Bryce Krah
09/25/2025, 1:07 PMMohammad Sharaf Ali
09/25/2025, 5:05 PMf3_add_reverse_tool.js
/**
* exampletools.jsc
* @NApiVersion 2.1
* @NModuleScope Public
*/
define([], function() {
return {
add: function (args) {
try {
const a = args["a"];
const b = args["b"];
return {
result: a+b
};
} catch(e) {
return {
result: "",
error: "There was an error executin the tool: " + e
}
}
},
reverseText: function (args) {
try {
const text = args["text"];
return {
result: text.split('').reverse().join('')
};
} catch(e) {
return {
result: "",
error: "There was an error executin the tool: " + e
}
}
}
}
});
f3_add_reverse_tool_schema.json
{
"tools": [
{
"name": "add",
"description": "Add two numbers together",
"inputSchema": {
"type": "object",
"properties": {
"a": {
"type": "number",
"description": "First addend"
},
"b": {
"type": "number",
"description": "Second addend"
}
},
"required": [
"a",
"b"
]
},
"outputSchema": {
"type": "object",
"properties": {
"result": {
"type": "number",
"description": "Value of adding the two input numbers"
},
"error": {
"type": "string",
"description": "Error message if execution fails"
}
},
"required": [
"result"
]
},
"annotations": {
"title": "Add Numbers",
"readOnlyHint": true,
"idempotentHint": true,
"openWorldHint": false
}
},
{
"name": "reverseText",
"description": "Reverses a given text string",
"inputSchema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text to reverse"
}
},
"required": [
"text"
]
},
"outputSchema": {
"type": "object",
"properties": {
"result": {
"type": "string",
"description": "Value of reversing the input text value"
},
"error": {
"type": "string",
"description": "Error message if execution fails"
}
},
"required": [
"result"
]
},
"annotations": {
"title": "Reverse Text",
"readOnlyHint": true,
"idempotentHint": true,
"openWorldHint": false
}
}
]
}
customtool_f3_add_reverse_tool.xml
<tool scriptid="customtool_f3_add_reverse_tool">
<name>Add Reverse Sample Tool Testing</name>
<scriptfile>[/SuiteScripts/F3_NS_SKD_Customizations/custom_tools/f3_add_reverse_tool.js]</scriptfile>
<rpcschema>[/SuiteScripts/F3_NS_SKD_Customizations/custom_tools/f3_add_reverse_tool_schema.json]</rpcschema>
<exposeto3rdpartyagents>T</exposeto3rdpartyagents>
<permission></permission>
</tool>
Attaching two screenshots for ref.Bryce Krah
09/25/2025, 5:29 PMMohammad Sharaf Ali
09/25/2025, 7:54 PMShawn Talbert
09/26/2025, 4:08 AMresult
and error
properties when they are technicall mutually exclusive. I think empirical evidence so far suggests that some AI clients and servers are sloppy with the MCP implementation.Shawn Talbert
09/26/2025, 4:12 AMMohammad Sharaf Ali
09/26/2025, 8:02 AMnullable
property as suggested in the NetSuite docs specifically for ChatGPT, and it works perfectly without any issues.
{
"tools": [
{
"name": "getSalesOrderInfo",
"description": "Retrieve comprehensive information about a specific sales order, including header fields, line items with expected ship dates, tax details, and additional metadata like department and location. Each line item includes expected ship date from the line or falls back to header ship date",
"inputSchema": {
"type": "object",
"properties": {
"orderId": {
"type": "string",
"description": "The internal ID of the sales order to retrieve detailed information for"
}
},
"required": [
"orderId"
],
"nullable": []
},
"outputSchema": {
"type": "object",
"properties": {
"result": {
"type": "string",
"description": "JSON stringified sales order data containing comprehensive details, or empty string if error occurred"
},
"error": {
"type": "string",
"description": "Error message if execution fails, or empty string if successful"
}
},
"required": [
"result"
],
"nullable": [
"error"
]
},
"annotations": {
"title": "Get Sales Order Information",
"readOnlyHint": true,
"idempotentHint": true,
"openWorldHint": false
}
}
]
}
Bryce Krah
09/26/2025, 12:41 PMMohammad Sharaf Ali
09/26/2025, 3:15 PMMrPine
09/29/2025, 12:31 PM