Skip to main content
Glama

get-current-time

Retrieve the current time in your local timezone to synchronize applications or check system time.

Instructions

Get the current time in the configured local timezone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes the 'get-current-time' tool by returning the current local time as a formatted text content object.
    if name == "get-current-time": return [ types.TextContent( type="text", text=f"The current time is {datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}", ) ]
  • Registers the 'get-current-time' tool, providing its name, description, and input schema for tool discovery.
    @server.list_tools() async def handle_list_tools() -> list[types.Tool]: """ List available tools. Each tool specifies its arguments using JSON Schema validation. """ return [ types.Tool( name="get-current-time", description="Get the current time in the configured local timezone", inputSchema={"type": "object"}, ) ]
  • Defines the tool schema including name, description, and empty input schema (no parameters required).
    types.Tool( name="get-current-time", description="Get the current time in the configured local timezone", inputSchema={"type": "object"}, )

Other Tools

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/SecretiveShell/MCP-timeserver'

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