docs(time): fix example responses to match actual server output#4439
Open
alvabillwu wants to merge 1 commit into
Open
docs(time): fix example responses to match actual server output#4439alvabillwu wants to merge 1 commit into
alvabillwu wants to merge 1 commit into
Conversation
…tch server output The example responses in src/time/README.md did not match what the server actually returns (verified against src/time/src/mcp_server_time/server.py): - Both examples omitted the field that TimeResult includes. - convert_time example: source datetime showed 12:30 but the request used 16:30; target datetime and the +13.0h difference were wrong for a 2024-01-01 (EST, no DST) America/New_York -> Asia/Tokyo conversion. Corrected to 16:30-05:00 -> 06:30+09:00 (next day), +14.0h. - Removed the trailing comma after time_difference (invalid JSON). Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the example tool-call responses in
src/time/README.mdso they match whatmcp-server-timeactually returns. I verified the expected output againstsrc/time/src/mcp_server_time/server.py(theTimeResult/TimeConversionResultmodels and theconvert_timelogic) and recomputed the conversions with Python'szoneinfo.Problems fixed
1.
get_current_timeexample response omitted theday_of_weekfield thatTimeResultincludes.2.
convert_timeexample response had several errors:source.datetime2024-01-01T12:30:00-05:002024-01-01T16:30:00-05:00time: "16:30", not 12:30source.day_of_weekMondayTimeResultincludes ittarget.datetime2024-01-01T12:30:00+09:002024-01-02T06:30:00+09:00target.day_of_weekTuesdaytime_difference+13.0h+14.0h3. Removed the trailing comma after
time_difference(invalid JSON).Verification
The
time_differenceformat (+14.0h) matches the server'sf"{hours_difference:+.1f}h"for integer offsets.Doc-only change; no code or behavior affected.
🤖 Generated with Claude Code