Skip to content

Default Tools — Utilities

The 26 tools in default-tool-specs-builtin.json (16) and default-tool-specs-builtin-helpers.json (10) cover text manipulation, date arithmetic, math, security scanners, encoding, cryptographic primitives, and CSV serialisation / parsing. They share one property — no network, no filesystem, no env vars. Everything runs in-memory at sandbox L0 by default; the only outside helpers in play are safety.parser.csv for formatCsv / parseCsv and crypto.subtle for the crypto group — both still purely in-memory.

Because they ride on JVM stdlib — java.security.MessageDigest, javax.crypto, JCE, the JDK regex engine — every one of these runs identically on macOS, Windows, and Linux. See Tool Studio: Cross-platform by design for the mechanics.

The 26 tools split by concern.

Browse the 26 utilities

Every tool below runs at sandbox L0 with no env vars. Use the directory on the Default Tools index for cross-page search; this page is the full per-tool reference for the 26.

timezoneConvert 🆓

datetime · util L0

Converts a moment in time between IANA time zones. Returns the same instant rendered in the target zone (ISO with offset).

Params   text · toTimeZone

Env       —

Click for full reference · params · sandbox · JS source
dateDiff 🆓

datetime · util L0

Computes b - a in the requested unit (days|hours|minutes|seconds|milliseconds). Returns a number which may be fractional.

Params   a · b · unit

Env       —

Click for full reference · params · sandbox · JS source
urlEncode 🆓

text · util L0

Percent-encodes a string for use in a URL component. Equivalent to encodeURIComponent.

Params   text

Env       —

Click for full reference · params · sandbox · JS source
dateMath 🆓

datetime · util L0

Adds (or subtracts) a duration to a date and returns the resulting ISO timestamp. Unit: years|months|weeks|days|hours|minutes|seconds|milliseconds.

Params   text · amount · unit

Env       —

Click for full reference · params · sandbox · JS source
parseDate 🆓

datetime · util L0

Parses a date/time string (ISO 8601 or RFC 2822) and returns its components plus epochMillis.

Params   text · timeZone

Env       —

Click for full reference · params · sandbox · JS source
cronNext 🆓

datetime · util L0

Computes the next datetime matching a standard 5-field cron expression (minute hour day month weekday). Supports * , - / and ? (treated as *). Returns ISO timestamp in UTC.

Params   expression · from · count

Env       —

Click for full reference · params · sandbox · JS source
diffText 🆓

text · util L0

Returns a line-by-line diff between two texts. Each entry is {op, line} where op is one of '=' (unchanged), '-' (only in a), '+' (only in b).

Params   a · b

Env       —

Click for full reference · params · sandbox · JS source
sortLines 🆓

text · util L0

Sorts lines of text alphabetically. Supports reverse and case-insensitive options.

Params   text · reverse · caseInsensitive

Env       —

Click for full reference · params · sandbox · JS source
piiDetect 🆓

security · util L0

Scans text for personally identifiable information patterns (email, US SSN, US phone, credit card, IPv4). Returns an array of {type, masked, index}.

Params   text

Env       —

Click for full reference · params · sandbox · JS source
regexExtract 🆓

text · util L0

Returns all regex matches in the input. With the 'g' flag every match is returned; without it the first match (with capture groups) is returned.

Params   text · pattern · flags

Env       —

Click for full reference · params · sandbox · JS source
formatDate 🆓

datetime · util L0

Formats a date (ISO string or epoch ms) using a pattern with tokens yyyy/MM/dd HH🇲🇲ss SSS. Time zone aware.

Params   text · pattern · timeZone

Env       —

Click for full reference · params · sandbox · JS source
stats 🆓

math · util L0

Returns summary statistics (count, sum, min, max, mean, median, stddev) for an array of numbers.

Params   numbers

Env       —

Click for full reference · params · sandbox · JS source
secretPatternDetect 🆓

security · util L0

Scans text for well-known secret patterns (AWS keys, GitHub tokens, Slack tokens, OpenAI keys, Stripe keys, private keys). Returns an array of {type, masked, index}.

Params   text

Env       —

Click for full reference · params · sandbox · JS source
regexReplace 🆓

text · util L0

Replaces regex matches in the input with the given replacement string. Supports $1, $2 group back-references.

Params   text · pattern · replacement · flags

Env       —

Click for full reference · params · sandbox · JS source
evalExpression 🆓

math · util L0

Evaluates a safe arithmetic/logical expression (no eval, no host access). Supports + - * / % ** parens, &&, ||, !, ==, !=, <, <=, >, >=, and numeric/string/boolean literals plus variables from the variables object.

Params   expression · variables

Env       —

Click for full reference · params · sandbox · JS source
formatCsv 🆓

data · util L0

Serialises an array of rows into CSV text. Rows may be arrays (use header param) or objects (keys become the header). RFC 4180 quoting.

Params   rows · header · delimiter

Env       —

Click for full reference · params · sandbox · JS source
base64 🆓

encoding · util L0

Encodes UTF-8 text to base64, or decodes base64 back to UTF-8 text. Use mode='encode' (default) or 'decode'. URL-safe variant via urlSafe=true.

Params   text · mode · urlSafe

Env       —

Click for full reference · params · sandbox · JS source
hex 🆓

encoding · util L0

Encodes UTF-8 text to hex string, or decodes hex back to UTF-8 text. Use mode='encode' (default) or 'decode'.

Params   text · mode · upperCase

Env       —

Click for full reference · params · sandbox · JS source
uuid 🆓

crypto · util L0

Generates a cryptographically random UUID v4 string.

Params   —

Env       —

Click for full reference · params · sandbox · JS source
hash 🆓

crypto · util L0

Computes the cryptographic hash of UTF-8 text. Algorithms: SHA-256 (default), SHA-384, SHA-512. Returns lowercase hex.

Params   text · algorithm

Env       —

Click for full reference · params · sandbox · JS source
hmac 🆓

crypto · util L0

Computes an HMAC signature over UTF-8 text using a secret. Algorithms: SHA-256 (default), SHA-384, SHA-512. Returns lowercase hex.

Params   secret · text · algorithm

Env       —

Click for full reference · params · sandbox · JS source
secureRandom 🆓

crypto · util L0

Generates cryptographically secure random bytes. encoding: 'hex' (default), 'base64', or 'base64url'.

Params   bytes · encoding

Env       —

Click for full reference · params · sandbox · JS source
passwordGenerate 🆓

crypto · util L0

Generates a strong random password from selected character classes. Uses crypto.getRandomValues for unbiased selection.

Params   length · includeLowercase · includeUppercase · includeDigits · includeSymbols

Env       —

Click for full reference · params · sandbox · JS source
jwtDecode 🆓

crypto · util L0

Decodes a JWT without verifying its signature. Returns the header and payload as JSON, plus signaturePresent.

Params   token

Env       —

Click for full reference · params · sandbox · JS source
jwtVerify 🆓

crypto · util L0

Verifies a HS256/HS384/HS512 JWT signature using a shared secret and returns the decoded payload on success. Also checks exp and nbf claims when present.

Params   token · secret

Env       —

Click for full reference · params · sandbox · JS source
parseCsv 🆓

data · util L0

Parses CSV text into an array of rows. If header=true, each row is an object keyed by the first row.

Params   text · header · delimiter

Env       —

Click for full reference · params · sandbox · JS source

Composition patterns (in-memory data pipelines)

The 26 utilities are deliberately I/O-free, which makes them perfect for chains the agent runs entirely in-memory:

  • Text-shell ETLregexExtract(text, pattern)sortLines(text)formatCsv(rows) to turn raw log/text into structured CSV in one tool turn.
  • Crypto sign-and-mintsecureRandom(bytes=32) for the secret → hmac(secret, payload) for the signature → base64(text) to wire-encode — issuing a signed token without any Java.type(...) interop.
  • JWT inspect → re-encodejwtDecode(token) exposes header + payload → mutate fields in the agent prompt → hmac + base64 to rebuild a signed JWT (HS256/384/512).
  • Time math chainparseDate(text)dateMath(text, amount, unit)formatDate(text, pattern, timeZone) to normalise a user-supplied datetime to a target zone with a single call.
  • PII / secret scrubpiiDetect(text) + secretPatternDetect(text) over a chat transcript before forwarding it to a model — both return [{type, masked, index}] so the agent can redact in-place.

Tutorial 8: Default Tool Recipes walks one of these end-to-end (the text-shell ETL chain).

Keys & secrets

None. All 26 utilities run with the default sandbox baseline — no network, no filesystem, no env vars. That is what makes them the safe slice of the catalog to expose to the model with zero setup.

Tool Studio: Built-in JavaScript Helpers — the underlying crypto.subtle, safety.parser.csv, regex helpers each of these tools wraps. → Index — overview of all 86 default tools and the five reference pages.