Code Tool

Node catalog Artificial intelligence
On this page

Tool that runs JavaScript

Usage and specifics

Connect this tool to an agent tool port. name and description help the model select it; configure sources, templates and limits before calling. requireApproval, where available, controls operations requiring approval.

Technical type : ai_tool_code. Runtime : nodulz.

Credentials and prerequisites

This node defines no dedicated external credential. Remote sources or execution targets may still need their own access credentials.

See the credentials guide if a remote source or execution target requires access.

Parameters

Names below are technical keys. Defaults are not a ready-to-run configuration: complete fields required by your operation. Paths containing [] describe list items; some fields depend on the selected mode.

Parameter Type Default Values / limits
name string "code_tool" -
description string "Run JavaScript code" -
script string "return args;" -
parametersJson string "" -
timeoutMs number 5000 -; ≥ 100
requireApproval boolean false -

Initial configuration

Initial catalog configuration example, to adapt before running. Keep secrets in credentials.

json
{
  "name": "code_tool",
  "description": "Run JavaScript code",
  "script": "return args;",
  "parametersJson": "",
  "timeoutMs": 5000,
  "requireApproval": false
}

Verification

Test with representative data. Check node output in the inspector and logs, then use editor mapping for downstream fields. A trigger test with a simulated payload does not validate external service delivery.

See also : Expressions and data, Executions, Node catalog.