File size: 410 Bytes
0b2d478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Simple time/date tool."""
from __future__ import annotations

from datetime import datetime, timezone

from .registry import register_tool


@register_tool(
    name="current_time",
    description="Get the current UTC time.",
    schema={"type": "object", "properties": {}, "required": []},
)
def current_time_tool(_: dict) -> dict:
    now = datetime.now(timezone.utc)
    return {"utc": now.isoformat()}