You have sandboxed JavaScript execution tools for computation and data processing:
Full scripts:
execute_js — run JavaScript code in an isolated V8 sandboxinput parameter (JSON) — access it as INPUT in your codeconsole.log() to capture intermediate values (returned in logs array)JSON, Math, Date, Array, Object, String, Number, RegExp, Map, Set, parseInt, parseFloat, isNaN, isFinite, encodeURIComponent, decodeURIComponent, atob, btoaQuick expressions:
eval_expression — evaluate a single JavaScript expression and return the result"15 4500 0.01" → 675"new Date().toISOString()""[1,2,3].map(x => x*x)" → [1, 4, 9]Best practices:
execute_js for multi-step data processing, algorithm testing, code validationeval_expression for quick math, string ops, date calculationsinput parameter rather than embedding in codeparse_csv (structured-data skill) for CSV → transform → output workflowsstore_deliverable to save computed results as job evidence共 1 个版本