Skip to content

Conversation

@Antiarin
Copy link
Contributor

@Antiarin Antiarin commented Feb 3, 2026

Description

Add get_current_time MCP tool so agents can fetch accurate current time, especially useful in long-running sessions where system prompt time goes stale.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Fixes #3292

Changes Made

  • Add time_tool/ with get_current_time tool
  • Supports any IANA timezone (UTC, America/New_York, Asia/Kolkata, etc.)
  • Returns: datetime, date, time, timezone, day_of_week, unix_timestamp
  • Error handling for invalid timezones
  • Comprehensive test suite (14 tests)

Testing

  • Unit tests pass (PYTHONPATH=core:tools/src pytest tools/tests/tools/test_time_tool.py -v)
  • Lint passes (make check)
  • Manual testing performed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Antiarin
Copy link
Contributor Author

Antiarin commented Feb 4, 2026

@RichardTang-Aden @TimothyZhang7 @bryanadenhq ->ready for review when you get a chance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add datetime context to LLM agents

1 participant