feat(time): default to configured timezone when omitted - #3740
feat(time): default to configured timezone when omitted#3740Christian-Sidak wants to merge 1 commit into
Conversation
When --local-timezone is configured, the timezone parameters in get_current_time and convert_time now default to the local timezone instead of raising an error. This means LLMs no longer need to explicitly pass the timezone on every call. - get_current_time: timezone is now optional, defaults to local_tz - convert_time: source_timezone and target_timezone are optional, default to local_tz. Only time remains required. - Updated tool descriptions to reflect the default behavior Fixes modelcontextprotocol#2853
|
Friendly bump -- any chance this could get a look? Happy to make adjustments. |
|
Closing due to inactivity. Happy to reopen if there's interest. |
|
@claude review |
|
Claude finished @cliffhall's task in 2m 3s —— View job PR Review: feat(time): default to configured timezone when omitted
The core idea here is solid and the
|
Summary
When
--local-timezoneis configured, the time server currently only uses it as a hint in the tool description, hoping the LLM will pass it explicitly. If the LLM omits thetimezoneargument, the call fails with "Missing required argument."This PR makes the configured timezone an actual default:
get_current_time:timezoneis now optional. Defaults tolocal_tzwhen not provided.convert_time:source_timezoneandtarget_timezoneare now optional, both defaulting tolocal_tz. Onlytimeremains required.This means a user can say "what time is it?" and the LLM can call
get_current_timewith no arguments, getting the local time. Previously this would error.Fixes #2853
Test plan
get_current_timewith no timezone uses local_tzconvert_timewith no source_timezone uses local_tzconvert_timewith no target_timezone uses local_tz