Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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}"
  • 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)

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/guillochon/mlb-api-mcp'

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