[BUG] Claude Code has no idea what year it even is, leading to poor search results. Add a datetime MCP call inside before searching the web.
Status Fixed / completed
Maintainer reply ✓ Yes — dicksontsai
Activity 7 comments · opened Jun 20, 2025 · closed Jul 7, 2025
💡 Likely answer: A maintainer (dicksontsai, collaborator)
responded on this thread — see the highlighted reply below.
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.30 (Claude Code)
- Operating System: MacOS 15.3.2
- Terminal: Warp
Bug Description
Claude Code has no idea what year it even is, leading to poor search results. Please add an MCP server that provides it with the current date before each search to improve accuracy.
Steps to Reproduce
- Tell it to search the web for current or up-to-date information.
Expected Behavior
The current year to be used in searches (2025)
Actual Behavior
It typically adds '2024' to the search terms (it is 2025 at time of filing)
7 Comments
I confirm. I asked Claude to look for the newest documentation for SurrealDB, and it launches a web search "surrealdb latest documentation 2024" -_-
Wouldn't even need a separate datetime MCP call, the current time can be added into the prompt template by the client.
Actually, today's date is already in the system prompt, so I suppose it either needs to be passed to the websearch tool as a parameter or the websearch tool itself needs to insert it.
Excellent point!
I've noticed that whenever I ask Claude Code to generate a session log or summary document, it tends to include a date/timestamp in January 2025.
For web search specifically, we introduced prompting changes.
For more general issues with date/timestamp, we are working on a Start hook where you can optionally provide this information: https://github.com/anthropics/claude-code/issues/3062
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.