Skip to main content
Glama
wubbyweb
by wubbyweb

reverse_word

Reverse the characters of any word with this tool. Input a word, and it will return the reversed version, ideal for text transformation tasks in the MCP Demo Project.

Instructions

Reverses the characters in a given word

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wordYesThe word to reverse

Implementation Reference

  • The core handler function that implements the reverse_word tool logic by splitting the input string into characters, reversing their order, and joining them back.
    private reverseWord(word: string): string { return word.split("").reverse().join(""); }
  • Identical core handler function that implements the reverse_word tool logic in the SSE server.
    private reverseWord(word: string): string { return word.split("").reverse().join(""); }
  • Zod schema used to validate the input arguments for the reverse_word tool.
    const ReverseWordSchema = z.object({ word: z.string().describe("The word to reverse"), });
  • src/server.ts:39-52 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema.
    { name: "reverse_word", description: "Reverses the characters in a given word", inputSchema: { type: "object", properties: { word: { type: "string", description: "The word to reverse", }, }, required: ["word"], }, } as Tool,
  • Zod schema used to validate the input arguments for the reverse_word tool in SSE server.
    const ReverseWordSchema = z.object({ word: z.string().describe("The word to reverse"), });

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/wubbyweb/mcp-demo'

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