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