You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e05bef2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(time): report the second occurrence of an ambiguous fall-back time
convert_time attached the source zone to today's date and the given HH:MM,
which always resolves to fold=0: on a DST fall-back day a repeated wall time
(01:30 in America/New_York on 2024-11-03) has two instants, and the tool
silently answered with the first.
TimeConversionResult gains an optional later_occurrence (a LaterOccurrence:
a note, and the source, target and time_difference at the second instant),
set only when the source time's fold=1 reading has a different UTC offset.
source and target keep the first occurrence, so an unambiguous conversion is
unchanged apart from later_occurrence: null.
Closesmodelcontextprotocol#5196
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Copy file name to clipboardExpand all lines: src/time/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ The server speaks both eras of the Model Context Protocol over stdio, with nothi
31
31
The server is built on the SDK's high-level `MCPServer`. Each tool declares an `outputSchema` and returns its result twice: as `structuredContent`, and as the same object in indented JSON in a text block, for a client that does not read structured output.
32
32
33
33
-**A tool failure is an `isError` result** whose text the model can read and act on, prefixed `Error executing tool <name>: `. That covers an unknown or non-exact timezone (`Invalid timezone: ...`), an empty timezone (`Missing required argument: <argument>`), a time not in `HH:MM` 24-hour form, a wall-clock time skipped by a clock change, and an argument missing or of the wrong type (the SDK's validation message).
34
+
-**An ambiguous time is reported, not guessed.** On the day a clock change repeats a wall-clock time (a DST fall-back, such as 01:30 on 2024-11-03 in `America/New_York`), `convert_time` returns its first occurrence in `source` and `target`, and the second in `later_occurrence`: a `note` saying the time occurs twice, with that occurrence's own `source`, `target` and `time_difference`. For any other time `later_occurrence` is `null`.
34
35
-**An unknown tool name is a JSON-RPC `-32602` error** (`Unknown tool: <name>`), not an `isError` result, as both protocol versions specify.
35
36
- The server registers no prompts or resources. Their list methods answer with empty lists.
36
37
@@ -267,7 +268,8 @@ Response (`structuredContent`, and the same JSON as text):
0 commit comments