Skip to content

feat: add date tool with ISO 8601 and human-readable formatting - #78

Merged
avoidwork merged 3 commits into
mainfrom
feat/add-date-tool
Jun 3, 2026
Merged

feat: add date tool with ISO 8601 and human-readable formatting#78
avoidwork merged 3 commits into
mainfrom
feat/add-date-tool

Conversation

@avoidwork

@avoidwork avoidwork commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Description

Add a date tool that returns the current date and time in ISO 8601 UTC format by default, with an optional format parameter to switch between ISO 8601 and human-readable output.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional choice)
  • Performance improvement
  • CI / build / tooling

Testing

Added tests/unit/tools_date.test.js with 9 tests covering:

  • ISO 8601 format (default and explicit format: 'iso')
  • Human-readable format (format: 'human')
  • Fresh Date() instantiation (not cached)
  • createDateTool factory produces correct name, description, and schema
  • date tool registers in buildToolConfig with zero permissions

Also updated tests/unit/tool_index.test.js to account for the new date tool in empty-permissions assertions.

All 931 tests pass.

Coverage

  • 100% line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with 100% line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Example

Screenshot 2026-06-03 082349

Add a date tool that returns the current date/time as ISO 8601 by default
or in human-readable format with the optional format parameter. Registered
in the tools index with zero required permissions. Includes unit tests.
@avoidwork
avoidwork force-pushed the feat/add-date-tool branch from ab70661 to 0d51e4b Compare June 3, 2026 12:21
@avoidwork avoidwork self-assigned this Jun 3, 2026
@avoidwork
avoidwork merged commit dd7891b into main Jun 3, 2026
@avoidwork
avoidwork deleted the feat/add-date-tool branch June 3, 2026 12:29
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.

1 participant