Skip to content

Add a simple get_datetime server tool#22649

Merged
ngxson merged 1 commit into
ggml-org:masterfrom
eapache:ehuus/add-datetime-tool
May 4, 2026
Merged

Add a simple get_datetime server tool#22649
ngxson merged 1 commit into
ggml-org:masterfrom
eapache:ehuus/add-datetime-tool

Conversation

@eapache
Copy link
Copy Markdown
Contributor

@eapache eapache commented May 3, 2026

Overview

Add a get_datetime server tool (building on #21237) so that models can check the current date and time without it having to be manually edited into the prompt or system message.

Simplest "fix" (arguably a workaround) for #22178.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: I used AI to look up the C++ stdlib pattern for getting the time as a string; no agentic coding though

@eapache eapache requested review from a team as code owners May 3, 2026 15:02
Copy link
Copy Markdown
Contributor

@ServeurpersoCom ServeurpersoCom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favor. No cross-platform issues, returns the backend's local time, and it's the first built-in tool safe to expose in less trusted contexts since all the others require a trusted environment. Useful as a stopgap for #22178, and also a nice "hello world" example for the built-in tools backend.

Copy link
Copy Markdown
Contributor

@ngxson ngxson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong opinions, but probably we can move this into a more generic tool get_server_info that also returns a subset of info from /props

@ngxson ngxson merged commit c84e6d6 into ggml-org:master May 4, 2026
46 checks passed
samuraieng pushed a commit to samuraieng/llama.cpp that referenced this pull request May 6, 2026
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
cetarthoriphros pushed a commit to cetarthoriphros/llama.cpp that referenced this pull request May 9, 2026
meh pushed a commit to meh/llama.cpp that referenced this pull request May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants