feat(time): add tool annotations#3581
Conversation
olaservo
left a comment
There was a problem hiding this comment.
Both tool annotations are semantically correct:
get_current_time: reads the system clock — pure read-only, closed-world.convert_time: timezone arithmetic using bundledzoneinfodata — pure computation, no external calls.
openWorldHint: false is correct for both (no network access). readOnlyHint: true is accurate.
Minor note: destructiveHint and idempotentHint are redundant when readOnlyHint is true per the MCP spec ("meaningful only when readOnlyHint == false"). The filesystem server omits them for its read-only tools. Not wrong to include them — just a style difference.
Also note: PR #3580 (fetch annotations) includes identical changes to this same time server file. If both merge, one will conflict. Recommend merging this PR first so #3580 can be scoped to fetch-only on rebase.
LGTM — thanks @nielskaspers!
Reviewed with the assistance of Claude Code (claude-opus-4-6). Annotation semantics verified against the MCP specification and time server source code.
…modelcontextprotocol#3574) (modelcontextprotocol#3581) feat(time): add tool annotations Adds MCP ToolAnnotations to both time server tools (get_current_time, convert_time). Both are read-only, non-destructive, idempotent, and closed-world. Fixes modelcontextprotocol#3574
Summary
Adds MCP ToolAnnotations to both tools in the time server (
get_current_timeandconvert_time), marking them as read-only, non-destructive, idempotent, and closed-world — matching the annotation coverage already present in server-filesystem.Issue
Fixes #3574
Changes
ToolAnnotationsfrommcp.typesannotationsparameter to bothTool()declarations withreadOnlyHint=True,destructiveHint=False,idempotentHint=True,openWorldHint=FalseTesting