Skip to content

Get past time from the Time MCP server #2710

Closed

Description

@saroad2

Is your feature request related to a problem? Please describe.
As part of my work, I need a way to get past time.
For example, one of my customers might ask something like "Which requests were sent in the last 5 hours?"
I need to first fetch the time from 5 hours ago, and then call the tool that can fetch those requests based on a start time and end time.

Describe the solution you'd like
I would like to have a tool called get_time_ago with the following fields:

  • days_ago: int of how many days ago the time should be
  • hours_ago: int of how many hours ago the time should be
  • minutes_ago: int of how many minutes ago the time should be
  • seconds_ago: int of how many second ago the time should be
  • milliseconds_ago: int of how many milliseconds ago the time should

So for example, if I ask the LLM "Give me all the requests from two and a half hours ago", it will call get_time_ago(hours_ago=2, minutes_ago=30)

Describe alternatives you've considered
One possible alternative is that the LLM will call the get_current_time tool and deduce the past time on its own. Meaning, that this capability will be handled in the LLM side instead of the MCP side.
From my experience, LLMs have hard time to calculate time on their own, so if I run the "get_current_time" tool, the LLM might not be able to deduce the new time from the returned string. Having a dedicated tool for that will probably make our lives easier that way.

Additional context
If I will get an OK from the maintainers, I would gladly implement this!
In the implementation, I would probably use the datetime.timedelta class to handle the time differences.

Activity

  1. saroad2 commented on Sep 24, 2025

    @saroad2
    Author

    Hi @olaservo,

    I hope you're doing well! I opened this issue two weeks ago and wanted to kindly follow up.

    I’d love to hear your thoughts before moving forward with the implementation just to make sure it aligns with the project’s direction and avoids unnecessary work for everyone. I’m happy to make adjustments based on your feedback and contribute the implementation if it’s something your team finds valuable.

    Thanks so much for your time and consideration!

  2. olaservo commented on Oct 29, 2025

    @olaservo
    Member

    Hi @saroad2 sorry that I missed your tag here! I think this feature could be useful but right now we're focusing more on things like resolving bugs and enhancements that demonstrate MCP protocol features. Lets keep this open for the future. Thanks for the suggestion!

  3. added
    server-timeReference implementation for the Time MCP server - src/time
    on Oct 29, 2025
  4. cliffhall commented on Oct 19, 2026

    @cliffhall
    Member

    Triage: Priority Low (total 2)

    • Severity 1: A tool for past times and time arithmetic is a usability request a maintainer asked in the thread to keep open for later.
    • Urgency 1: no time pressure
    • Bonuses: none

    Board: Servers V2 (#43), Status Incoming, awaiting maintainer review (no milestone yet). Part of the backlog triage in #4875.

  5. added this to the v2.3.0 milestone on Oct 25, 2026
  6. self-assigned this
    on Oct 28, 2026
  7. cliffhall commented on Oct 29, 2026

    @cliffhall
    Member

    Shipped in #5369 on v2/main, proven alongside the other #5275 work in rollup #5400.

  8. added a commit that references this issue on Nov 4, 2026
    44d3659
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestserver-timeReference implementation for the Time MCP server - src/timev2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions