Time
The time tool provides agents with accurate date and time information and natural language time parsing. Agents use it whenever they need to know the current time or compute relative dates.
Tools
| Tool | Description |
|---|---|
get_time | Get the current date and time (with timezone) |
parse_time | Parse a natural language time expression into an ISO timestamp |
get_time
Returns the current UTC datetime and optionally converts to a specified timezone.
Arguments
| Argument | Type | Description |
|---|---|---|
timezone | string | Optional — IANA timezone (e.g. America/New_York, Europe/London) |
format | string | Optional — output format (iso, human, unix) |
Example output
{
"utc": "2024-11-15T14:30:00Z",
"local": "2024-11-15T09:30:00-05:00",
"timezone": "America/New_York",
"human": "Friday, November 15, 2024 at 9:30 AM EST"
}
parse_time
Parses natural language time expressions into structured datetime objects. Supports relative offsets, weekday targets, and timezone-aware expressions.
Examples
| Input | Resolved to |
|---|---|
"tomorrow at 9am" | Next day, 09:00 local time |
"next Monday" | The upcoming Monday |
"in 3 hours" | Current time + 3 hours |
"end of this month" | Last day of current month |
"Q4 start" | October 1st of the current year |
"2 weeks ago" | 14 days before now |
Use cases
What time is it now in Tokyo?
Set a reminder for next Friday at 3pm Eastern.
Generate a report for all events from 30 days ago to today.
Calculate how many days until December 31st.
Why agents need this tool
LLM training data has a knowledge cutoff. Without the time tool, agents have no way to know the current date — they may confidently give the wrong date. Always include the time tool for any agent that needs to be time-aware.
Tip: Add this to time-sensitive agents' system prompts:
At the start of each conversation, use get_time to learn the current date and time before answering any time-related questions.