diff --git a/src/time/src/mcp_server_time/server.py b/src/time/src/mcp_server_time/server.py index e10d6b4eed..83e97af333 100644 --- a/src/time/src/mcp_server_time/server.py +++ b/src/time/src/mcp_server_time/server.py @@ -8,7 +8,7 @@ from mcp.server import Server from mcp.server.stdio import stdio_server -from mcp.types import Tool, TextContent, ImageContent, EmbeddedResource, ErrorData, INVALID_PARAMS +from mcp.types import Tool, ToolAnnotations, TextContent, ImageContent, EmbeddedResource, ErrorData, INVALID_PARAMS from mcp.shared.exceptions import McpError from pydantic import BaseModel @@ -142,6 +142,12 @@ async def list_tools() -> list[Tool]: }, "required": ["timezone"], }, + annotations=ToolAnnotations( + readOnlyHint=True, + destructiveHint=False, + idempotentHint=True, + openWorldHint=False, + ), ), Tool( name=TimeTools.CONVERT_TIME.value, @@ -164,6 +170,12 @@ async def list_tools() -> list[Tool]: }, "required": ["source_timezone", "time", "target_timezone"], }, + annotations=ToolAnnotations( + readOnlyHint=True, + destructiveHint=False, + idempotentHint=True, + openWorldHint=False, + ), ), ]