Skip to main content
Glama

echo_tool

Send a message and receive it back instantly for testing MCP client functionality with the Echo MCP Server.

Instructions

Echo a message as a tool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes

Implementation Reference

  • The handler function for echo_tool, decorated with @mcp.tool() for registration. It echoes the input message and includes the SECRET_KEY environment variable in the response.
    @mcp.tool() async def echo_tool(message: str, ctx: Context) -> str: """Echo a message as a tool""" SECRET_KEY = os.getenv("SECRET_KEY", "No secret key found") await ctx.info(f"Processing echo request for message: '{message}'") return f"Tool echo: {message}. The environment variable SECRET_KEY is: {SECRET_KEY}"
  • Decorator that registers the echo_tool with the MCP server.
    @mcp.tool()
  • Function signature and docstring defining the input (message: str), context (ctx: Context), and output (str), along with tool description.
    async def echo_tool(message: str, ctx: Context) -> str:

Other Tools

Related Tools

  • @avi892nash/purescript-mcp-tools
  • @currentspace/bootstrap_mcp
  • @srafi26/mcp-server
  • @shaleen-wonder-ent/simple-mcp-server
  • @vjouenne76/mcp-server-scaffold
  • @balajidommeti/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/piebro/echo-mcp-server-for-testing'

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