script
Script Model
Defines the structure of a Script tool, including execution code, metadata, and user-editable settings.
id (integer, Read-only)
Unique identifier of the script.
parameters (array of Parameter objects)
A list of parameters required by the script.
name (string) Required
Name of the script tool.
- Min length: 1
description (string) Required
A brief summary of the script tool’s functionality.
- Min length: 1
created_at (string, Read-only, date-time)
Timestamp when the script was created.
updated_at (string, Read-only, date-time)
Timestamp when the script was last updated.
show_tool_message (boolean)
Determines whether to display the tool’s message to users.
show_assistant_message (boolean)
Determines whether to display the assistant’s message.
edit_available (boolean)
Specifies if the script can be edited by end users.
code (string) Required
The actual source code of the script.
- Min length: 1
Example
{
"parameters": [
{
"name": "string",
"description": "string",
"type": "string",
"required": true
}
],
"name": "string",
"description": "string",
"show_tool_message": true,
"show_assistant_message": true,
"edit_available": true,
"code": "string"
}