Skip to main content
Glama
ChenReuven

MCP TypeScript Simple Template

by ChenReuven

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
NameRequiredDescriptionDefault
textYes

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 }] })
  • 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 }] }) );

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChenReuven/mcp-ts-simple-template'

If you have feedback or need assistance with the MCP directory API, please join our Discord server