Skip to main content
Glama

get_current_time

Retrieve the current time in HH:MM:SS format from the MLB API MCP server for time-sensitive baseball data operations and scheduling.

Instructions

Get the current time.

Returns: str: The current time in HH:MM:SS format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_current_time tool handler: decorated with @mcp.tool(), returns current time as string in HH:MM:SS format, handles exceptions.
    @mcp.tool() def get_current_time() -> str: """Get the current time. Returns: str: The current time in HH:MM:SS format """ try: current_time = datetime.now().strftime("%H:%M:%S") return current_time except Exception as e: return f"Error getting current time: {e!s}"
  • main.py:21-23 (registration)
    Registration of tools by calling setup_generic_tools(mcp), which defines and registers get_current_time.
    # Setup all MLB and generic tools setup_mlb_tools(mcp) setup_generic_tools(mcp)
  • Docstring schema defining the tool's purpose and return type (str). Used by @mcp.tool() for input/output schema.
    """Get the current time. Returns: str: The current time in HH:MM:SS format """

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