Skip to main content
Glama

get_time

Retrieve the current time in a human-readable format for accurate time tracking and synchronization within the MCP Ahrefs server environment.

Instructions

Get the current time.

Returns the current time in a human-readable format. Returns: Current time as a string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_time' tool. It returns the current time in ISO-like format using time.strftime.
    async def get_time() -> str: """Get the current time. Returns the current time in a human-readable format. Returns: Current time as a string """ return f"Current time: {time.strftime('%Y-%m-%d %H:%M:%S')}"
  • Registration code that decorates and registers all tools from the example_tools list (including get_time) with the MCP server using FastMCP's tool decorator.
    for tool_func in example_tools: # Apply SAAGA decorator chain: exception_handler → tool_logger decorated_func = exception_handler(tool_logger(tool_func, config.__dict__)) # Extract metadata from the original function tool_name = tool_func.__name__ # Register the decorated function directly with MCP # This preserves the function signature for parameter introspection mcp_server.tool( name=tool_name )(decorated_func) unified_logger.info(f"Registered tool: {tool_name}")
  • The list defining regular example tools, including get_time, which is imported into server/app.py for automatic registration.
    example_tools = [ echo_tool, get_time, random_number, calculate_fibonacci ]

Other Tools

Related 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/SAGAAIDEV/mcp-ahrefs'

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