get_local_time
Retrieve the current local time and timezone details from a user's machine to assist in scheduling or troubleshooting based on their location.
Instructions
Returns the current local time and timezone information from your local machine. This helps you understand what time it is for the user you're assisting.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp_simple_timeserver/server.py:12-26 (handler)Registration of the get_local_time tool using the @app.tool decorator with metadata annotations including title and readOnlyHint.@app.tool( annotations = { "title": "Get Local Time and Timezone", "readOnlyHint": True } ) def get_local_time() -> str: """ Returns the current local time and timezone information from your local machine. This helps you understand what time it is for the user you're assisting. """ local_time = datetime.now() timezone = str(local_time.astimezone().tzinfo) formatted_time = local_time.strftime("%Y-%m-%d %H:%M:%S") return f"Current Time: {formatted_time}\nTimezone: {timezone}"