Skip to main content
Glama

get_local_datetime_info

Retrieve current local datetime and timezone information to support astronomical calculations for celestial object tracking.

Instructions

Retrieve the current datetime and timezone.

Returns: Dict with keys "data", "_meta". "data" contains "current_time" (ISO string).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_local_datetime_info' tool. It retrieves the current local datetime and timezone info, formats it, and returns it as a structured response.
    @mcp.tool() def get_local_datetime_info() -> Dict[str, Any]: """ Retrieve the current datetime and timezone. Returns: Dict with keys "data", "_meta". "data" contains "current_time" (ISO string). """ tz = get_localzone() current_time = datetime.datetime.now(tz) return format_response({ "current_time": current_time.isoformat() })
  • src/main.py:10-10 (registration)
    Import statement in main.py that loads the time/impl.py module, triggering the @mcp.tool() decorator to register the 'get_local_datetime_info' tool with the MCP server instance.
    import src.functions.time.impl

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/StarGazer1995/mcp-stargazing'

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