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.
Input Schema
TableJSON 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}` }] })