It's good idea. I didn't think of it because this project came about a "let's try to write a remote MCP server now that the standard has stabilized."
But there are some issues:
1. Cheaper + Deterministic: It is much more costly, both in terms of tokens and context window. (Generating the code takes many more tokens than making a tool call.) And there can be variability in the query, like issues with timezones.
2. Portability: It is not portable, not all LLM or LM environments have access to a code interpreter. This is a much lower resource requirement.
3. Extensibility: This approach is extensible, and it allows us to expand the toolkit with additional cognitive scaffolds that help contextualize how we experience time for the model. (This is a fancy way of saying: The code only gives the timestamp, but building an MCP allows us to contextualize this information — "this is time I'm sleeping, this is the time I'm eating or commuting, etc.")
4. Security: Ops teams are happier approving a read-only REST call than arbitrary code running.
One last thing I will say: The MCP server specification is unclear how much the initial "instructions", the README.md of the server for the model, is discovered. In the "passage-of-time" MCP server, the instructions provide the model with information on each available tool as well as the requirement to poll the time at each message.
In practice, this hasn't really worked. I've had to add a custom instruction to "call current_datetime" at each message to get Claude to do it consistently over time.
Still, it is meaningful that I ask the model to make a single quick query rather than generate code.
Because LLMs are notoriously unreliable especially over long context. Telling it something like "check the time before every turn" is going to fail after enough interactions. MCP call is more reliable for programmatic and specific queries, like retrieving the time.