get_current_time
Retrieve the current local date and time in YYYY-MM-DD HH:MM:SS format for timestamping or scheduling tasks.
Instructions
Get current local datetime as YYYY-MM-DD HH:MM:SS.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:185-188 (handler)The handler function that executes the tool logic, returning the current local datetime formatted as YYYY-MM-DD HH:MM:SS.def tool_get_current_time() -> str: current_time = datetime.now() return current_time.strftime("%Y-%m-%d %H:%M:%S")
- main.py:82-86 (schema)Defines the tool's input schema, name, and description for registration.Tool( name="get_current_time", description="Get current local datetime as YYYY-MM-DD HH:MM:SS.", inputSchema={"type": "object", "properties": {}, "required": []}, ),
- main.py:217-218 (registration)Registration in the call_tool dispatcher that maps the tool name to its handler function.if name == "get_current_time": return _wrap_json(tool_get_current_time())