Skip to main content
Glama

echo_tool

Test and verify input messaging within MCP Ahrefs by echoing back received data. Demonstrates basic MCP tool functionality with automated logging and exception handling for reliable integration checks.

Instructions

Echo back the input message.

This is a simple example tool that demonstrates basic MCP tool functionality. It will be automatically decorated with SAAGA decorators for exception handling and logging. Args: message: The message to echo back Returns: The echoed message with a prefix

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes

Implementation Reference

  • The core handler function for the 'echo_tool' that simply echoes back the input message with an 'Echo:' prefix.
    async def echo_tool(message: str) -> str: """Echo back the input message. This is a simple example tool that demonstrates basic MCP tool functionality. It will be automatically decorated with SAAGA decorators for exception handling and logging. Args: message: The message to echo back Returns: The echoed message with a prefix """ return f"Echo: {message}"
  • Registration loop for regular example_tools (including echo_tool), applying SAAGA decorators (exception_handler, tool_logger) and registering each with mcp_server.tool().
    # Register regular tools with SAAGA decorators 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 collecting the echo_tool among other example tools for subsequent registration in the server.
    example_tools = [ echo_tool, get_time, random_number, calculate_fibonacci ]
  • Import of the example_tools list containing echo_tool for registration.
    from mcp_ahrefs.tools.example_tools import example_tools, parallel_example_tools

Other Tools

Related Tools

  • @avi892nash/purescript-mcp-tools
  • @7gugu/zip-mcp
  • @srafi26/mcp-server
  • @piebro/echo-mcp-server-for-testing
  • @currentspace/bootstrap_mcp
  • @epicweb-dev/epic-me-mcp

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