所有服务器工具
为模型提供可靠的时间上下文。当提示词依赖今天的日期或当前时间时,模型会调用该工具,OpenRouter 则返回当前日期和时间,也可使用配置的时区。
工作原理
适用于依赖当前日期或时间的提示词,例如日程安排和截止时间。
- 1
您的模型 在需要当天日期或当前时间时调用该工具。
- 2
OpenRouter 返回 UTC 或您设置的时区的当前日期时间。
- 3
您的模型 根据实际日期作答,而不是根据训练数据猜测。
提供商与定价
OpenRouter
免费
在请求期间于 OpenRouter 的进程内运行。
每个请求均按标准模型 token 费用计费。
使用此工具
OpenRouter 在请求期间运行工具并将结果返回给模型,因此无需客户端工具循环。
支持的 API:Chat Completions, Responses, and Anthropic Messages。
shell
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.2",
"tools": [
{
"type": "openrouter:datetime"
}
],
"messages": [
{
"role": "user",
"content": "How many days are left until the end of this quarter?"
}
]
}'文档中提供了设置、参数和示例。
阅读集成指南相关工具
实用工具