Skip to content

fix(time): correct invalid IANA timezone example in convert_time description#4536

Open
Lumos-789 wants to merge 1 commit into
modelcontextprotocol:mainfrom
Lumos-789:fix/time-server-invalid-iana-timezone-example
Open

fix(time): correct invalid IANA timezone example in convert_time description#4536
Lumos-789 wants to merge 1 commit into
modelcontextprotocol:mainfrom
Lumos-789:fix/time-server-invalid-iana-timezone-example

Conversation

@Lumos-789

Copy link
Copy Markdown

Problem

The convert_time tool's target_timezone parameter description uses 'America/San_Francisco' as an example. This is not a valid IANA timezone identifier — the tz database has no such key (San Francisco uses 'America/Los_Angeles').

>>> from zoneinfo import ZoneInfo
>>> ZoneInfo('America/San_Francisco')
ZoneInfoNotFoundError: No time zone found with key America/San_Francisco

Impact

LLM clients consuming this description as a usage hint tend to copy example values verbatim. Passing 'America/San_Francisco' causes the server to reject the call with INVALID_PARAMS, surprising the user.

Fix

Replace the example with the valid 'America/Los_Angeles' identifier. This also brings target_timezone in line with the source_timezone description, which already correctly uses 'America/New_York' / 'Europe/London'.

Verification

  • No test asserts on the description text (grep'd San_Francisco across src/time/test/ — only the production code uses it).
  • One-line change, no logic affected.

…ription

The 'target_timezone' parameter description used 'America/San_Francisco'
as an example, which is not a valid IANA timezone identifier — the tz
database has no such key (San Francisco uses 'America/Los_Angeles').

Verification:
  >>> from zoneinfo import ZoneInfo
  >>> ZoneInfo('America/San_Francisco')
  ZoneInfoNotFoundError: No time zone found with key America/San_Francisco

Impact:
LLM clients consuming this description as a usage hint tend to copy example
values verbatim. Passing 'America/San_Francisco' causes the server to
reject the call with INVALID_PARAMS, surprising the user.

Fix: replace with the valid 'America/Los_Angeles' identifier. This also
brings target_timezone in line with the source_timezone description,
which already correctly uses 'America/New_York' / 'Europe/London'.
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