echo
Receive immediate feedback by sending text input to return the same text in response using this lightweight utility within the MCP TypeScript Simple Template framework.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes |
Implementation Reference
- index.ts:18-23 (handler)The handler function for the 'echo' tool. It takes the input 'text' and returns it wrapped in a content block of type 'text'.async ({ text }) => ({ content: [{ type: "text", text }] })
- index.ts:15-17 (schema)Input schema for the 'echo' tool, defining a required 'text' parameter as a string using Zod.{ text: z.string() },
- index.ts:13-24 (registration)Registration of the 'echo' tool on the MCP server using server.tool, including name, input schema, and handler function.server.tool( "echo", { text: z.string() }, async ({ text }) => ({ content: [{ type: "text", text }] }) );