Skip to content

docs(time): correct Example Interactions to match server output - #4688

Open
coolrice5 wants to merge 1 commit into
modelcontextprotocol:mainfrom
coolrice5:fix-time-readme-examples
Open

docs(time): correct Example Interactions to match server output#4688
coolrice5 wants to merge 1 commit into
modelcontextprotocol:mainfrom
coolrice5:fix-time-readme-examples

Conversation

@coolrice5

Copy link
Copy Markdown

The "Example Interactions" responses in src/time/README.md don't match what the server actually returns. Verified against src/time/src/mcp_server_time/server.py, where TimeResult declares four fields (timezone, datetime, day_of_week, is_dst).

Five issues:

  1. Both examples omit day_of_week, which the server always sets via strftime("%A").
  2. The convert_time source shows 12:30 though the request asks for 16:30.
  3. The target shows 2024-01-01T12:30:00+09:00 — the conversion did nothing. New York 16:30 EST is 2024-01-02T06:30:00+09:00 in Tokyo.
  4. time_difference reads +13.0h; EST (-5) to JST (+9) is +14.0h.
  5. A trailing comma after time_difference makes the JSON invalid.

Documentation only — no code changes.

Credit to @latent-9, who identified these same issues in #4597 and closed that PR themselves.

The example responses in src/time/README.md did not match what the server
actually returns:

- Both examples omitted `day_of_week`, which `TimeResult` declares and the
  server always populates via `strftime("%A")`.
- The `convert_time` source showed 12:30 although the request asks for 16:30.
- The target showed `2024-01-01T12:30:00+09:00`, i.e. the conversion had no
  effect. New York 16:30 EST is 06:30 the next day in Tokyo.
- `time_difference` read `+13.0h`; EST (-5) to JST (+9) is +14.0h.
- A trailing comma after `time_difference` made the JSON invalid.

Verified against src/time/src/mcp_server_time/server.py.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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