get_current_date
Retrieve the current date in YYYY-MM-DD format for accurate timestamping and synchronization in MLB data processing and integration workflows.
Instructions
Get the current date.
Returns: str: The current date in YYYY-MM-DD format
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- generic_api.py:7-18 (handler)The core handler function for the 'get_current_date' tool, decorated with @mcp.tool() which handles registration and schema from docstring. Returns the current date in YYYY-MM-DD format using datetime.now().@mcp.tool() def get_current_date() -> str: """Get the current date. Returns: str: The current date in YYYY-MM-DD format """ try: current_date = datetime.now().strftime("%Y-%m-%d") return current_date except Exception as e: return f"Error getting current date: {e!s}"
- generic_api.py:9-13 (schema)Docstring defining the tool description, parameters (none), and output schema (str: YYYY-MM-DD date). Used by MCP for tool schema."""Get the current date. Returns: str: The current date in YYYY-MM-DD format """
- main.py:23-23 (registration)Call to setup_generic_tools(mcp) which executes the decorated function definitions to register the 'get_current_date' tool with the MCP server.setup_generic_tools(mcp)