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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp_ahrefs/tools/example_tools.py:29-37 (handler)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')}"
- mcp_ahrefs/server/app.py:98-112 (registration)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 ]
- mcp_ahrefs/server/app.py:23-23 (registration)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