Skip to main content
Glama
andybrandt

MCP Simple Timeserver

get_local_time

Retrieve current local time and timezone details from your machine to determine the user's local time for accurate assistance.

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_local_time' tool, which retrieves and formats the current local time and timezone information.
    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}"
  • Registers the 'get_local_time' tool with FastMCP using the @app.tool decorator, including title and read-only annotations.
    @app.tool( annotations = { "title": "Get Local Time and Timezone", "readOnlyHint": True } )

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andybrandt/mcp-simple-timeserver'

If you have feedback or need assistance with the MCP directory API, please join our Discord server