echo
Test and verify MCP server functionality by returning the exact input message provided, enabling developers to validate communication and response handling in their MCP implementations.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"message": "<message>"
},
"name": "echo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes |
Implementation Reference
- src/index.ts:22-28 (registration)Registration of the 'echo' tool on the MCP server, including schema and inline handler.
server.tool( "echo", { message: z.string() }, async ({ message }) => ({ content: [{ type: "text", text: `Tool echo: ${message}` }] }) ); - src/index.ts:24-24 (schema)Input schema for the 'echo' tool: requires a 'message' string.
{ message: z.string() }, - src/index.ts:25-27 (handler)Handler function that executes the 'echo' tool logic by returning the message as text content.
async ({ message }) => ({ content: [{ type: "text", text: `Tool echo: ${message}` }] })