current_time
Current date and time
Returns the exact current date, time, weekday and UTC offset in any time zone. Use this whenever you need to know today's date or the current time instead of guessing — your training data does not know what day it is.
Parameterstimezone
convert_timezone
Convert time zones
Converts a date/time from one time zone to another, correctly handling daylight saving time. If the input already includes an offset or 'Z', from_timezone is ignored.
Parametersdatetimerequiredto_timezonerequiredfrom_timezone
date_add
Add or subtract time
Adds or subtracts a duration (years, months, weeks, days, hours, minutes, seconds) to a date/time. Use negative numbers to subtract. Calendar-aware: adding 1 month to Jan 31 gives Feb 28/29, and adding days keeps the same local clock time across daylight-saving changes.
Parametersdayshoursweeksyearsmonthsminutessecondsdatetimerequiredtimezone
date_diff
Time between two dates
Calculates the exact time between two dates/times: a calendar breakdown (years, months, days, hours, minutes, seconds) plus totals in days, hours, minutes and seconds, and the number of calendar days. Negative if end is before start.
Parametersendrequiredstartrequiredtimezone
business_days
Business day calculator
Works with business (working) days. mode "add": returns the date N business days after start_date (start_date itself is not counted; negative N goes backward; 0 returns start_date, or the next business day if start_date is not one). mode "count": counts business days from start_date to end_date, including both ends. Weekends default to Saturday and Sunday. Public holidays are NOT built in — pass them in "holidays".
Parametersdaysmoderequiredweekendend_dateholidaysstart_daterequired
calculate
Exact calculator
Evaluates an arithmetic expression exactly, so you don't have to do mental math. Supports + - * / % ^ (or **), parentheses, constants pi/e/tau and functions: sqrt, cbrt, abs, round(x, digits), floor, ceil, trunc, sign, ln, log(x[, base]), log10, log2, exp, pow, sin, cos, tan, asin, acos, atan, atan2, min, max, hypot, factorial. Trig uses radians. Example: "(1250 * 1.08^5) - 1250".
Parametersdecimalsexpressionrequired
convert_units
Unit converter
Converts a value between units of length, mass, volume (US and imperial), area, speed, time, digital data (KB vs KiB, bits vs bytes), energy, pressure and temperature. Accepts common abbreviations (km, lb, fl oz, mph, °F, GiB). US customary units are used for cup/pint/quart/gallon unless you say imperial.
Parameterstorequiredfromrequiredvaluerequired
text_stats
Count characters, words and lines
Counts exactly what language models are bad at counting: characters (as humans see them), words, lines, sentences, paragraphs, UTF-8 bytes, and occurrences of a letter or substring (e.g. how many "r" in "strawberry"). Use it to check length limits (tweets, SMS, meta descriptions, form fields) before submitting text.
Parameterstextrequiredcountoverlappingcase_sensitive
hash_text
Hash and encode text
Computes a cryptographic hash (SHA-1, SHA-256, SHA-384, SHA-512) of text, or encodes/decodes it as Base64, Base64URL, hex or URL-encoding. Text is treated as UTF-8.
Parameterstextrequiredoperationrequired
regex_test
Test a regular expression
Runs a JavaScript regular expression against text and returns every match with its position and capture groups, or the text after replacement. Use it to verify a regex actually works before relying on it.
Parameterstextrequiredflagspatternrequiredmax_matchesreplace_with
validate_email
Validate an email address
Checks whether an email address is correctly formatted and returns a normalized version. Set check_dns=true to also confirm the domain exists and can receive mail (MX records). Does not send email and cannot confirm that a specific mailbox exists.
Parametersemailrequiredcheck_dns
validate_phone
Validate and format a phone number
Validates a phone number using Google's libphonenumber rules and returns it in E.164 (+14155552671), international and national formats, plus the country and line type (mobile, fixed line, toll free...). For numbers without a +country code, pass default_country.
Parametersphonerequireddefault_country
validate_url
Validate and normalize a URL
Checks that a URL is well-formed, normalizes it (lowercase host, punycode, default ports removed, spaces encoded) and splits it into parts including each query parameter. Flags common problems such as missing scheme, private/localhost addresses and credentials embedded in the URL. Does not fetch the URL.
Parametersurlrequiredrequire_https
validate_iban
Validate an IBAN
Validates an International Bank Account Number: country, length for that country, and the mod-97 check digits. Returns electronic and printed formats. A valid IBAN is correctly formed; this does not confirm the account exists.
Parametersibanrequired
json_repair
Fix broken JSON
Turns almost-JSON into valid JSON: removes markdown code fences, comments and trailing commas, adds missing quotes, commas and closing brackets, converts single quotes, Python True/False/None and truncated output. Returns the repaired JSON string and whether the input was already valid.
Parameterstextrequiredpretty
json_schema_validate
Validate JSON against a schema
Checks a JSON value against a JSON Schema (drafts 4, 7, 2019-09 and 2020-12) and lists every violation with its location. Use it to confirm structured output or an API payload is correct before sending it. `data` and `schema` may be JSON values or JSON strings.
Parametersdatarequireddraftschemarequired