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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/functions/time/impl.py:7-19 (handler)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