echo
Test message handling in MCP servers by sending and receiving identical text to verify communication channels and data integrity.
Instructions
Echo back a message.
Args: message: The message to echo back
Returns: The same message that was provided
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes |
Implementation Reference
- The echo tool handler function decorated with @mcp.tool(). It takes a string message and returns it unchanged after logging a debug message. The docstring provides the schema description for the input parameter and return value.@mcp.tool() def echo(message: str) -> str: """ Echo back a message. Args: message: The message to echo back Returns: The same message that was provided """ logger.debug(f"Echo tool called with message: {message}") return message