Skip to main content
Glama

get_time

Retrieve the current time in human-readable format from the MCP Ahrefs server for timestamping SEO operations and data synchronization.

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 main handler function for the 'get_time' tool. It returns the current timestamp in a formatted string using Python's time module.
    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 loop for regular example tools (including get_time). Applies decorators (exception_handler, tool_logger) and registers the decorated function 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}")
  • List of regular example tools that includes get_time, imported and used for registration in the server.
    example_tools = [ echo_tool, get_time, random_number, calculate_fibonacci ]
  • Import of example_tools list containing get_time from example_tools.py, prerequisite for registration.
    from mcp_ahrefs.tools.example_tools import example_tools, parallel_example_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