We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kcbabo/everything-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
echo.py•683 B
"""Example echo tool for my-mcp MCP server.
This is an example tool showing the basic structure for FastMCP tools.
Each tool file should contain a function decorated with @mcp.tool().
"""
from core.server import mcp
from core.utils import get_tool_config
@mcp.tool()
def echo(message: str) -> str:
"""Echo a message back to the client.
Args:
message: The message to echo
Returns:
The echoed message with any configured prefix
"""
# Get tool-specific configuration
config = get_tool_config("echo")
prefix = config.get("prefix", "")
# Return the message with optional prefix
return f"{prefix}{message}" if prefix else message