Skip to main content
Glama
Traves-Theberge

Word of the Day MCP Server

get_random_word

Retrieve a random English word with its definition to expand vocabulary. Choose difficulty level (easy, medium, hard) for targeted learning.

Instructions

Get a random word with its definition for word of the day

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
difficultyNoDifficulty level of the random wordmedium

Implementation Reference

  • The main handler function for the 'get_random_word' tool. Parses args with schema, selects random word from difficulty-based lists, and delegates to getWordDefinition for full response.
    private async getRandomWord(args: unknown) {
      const { difficulty = 'medium' } = GetRandomWordArgsSchema.parse(args);
      
      // List of curated words by difficulty level
      const wordLists = {
        easy: [
          'happy', 'house', 'water', 'light', 'music', 'friend', 'smile', 'peace', 
          'dream', 'heart', 'love', 'hope', 'time', 'life', 'world', 'nature'
        ],
        medium: [
          'serendipity', 'eloquent', 'resilient', 'magnificent', 'innovative', 
          'perspective', 'authentic', 'curiosity', 'adventure', 'harmony', 
          'wisdom', 'courage', 'gratitude', 'compassion', 'creativity', 'balance'
        ],
        hard: [
          'ephemeral', 'ubiquitous', 'perspicacious', 'surreptitious', 'magnanimous',
          'obfuscate', 'ameliorate', 'propensity', 'vicissitude', 'perspicuity',
          'sesquipedalian', 'grandiloquent', 'pusillanimous', 'truculent', 'recalcitrant'
        ]
      };
    
      const words = wordLists[difficulty];
      const randomWord = words[Math.floor(Math.random() * words.length)];
      
      // Get the definition for the random word
      return await this.getWordDefinition({ word: randomWord, language: 'en' });
    }
  • Zod validation schema for get_random_word tool inputs: optional 'difficulty' enum.
    const GetRandomWordArgsSchema = z.object({
      difficulty: z.enum(['easy', 'medium', 'hard']).default('medium').optional(),
    });
  • src/index.ts:91-106 (registration)
    Tool metadata registration in ListTools response: name, description, inputSchema matching the Zod schema.
    {
      name: 'get_random_word',
      description: 'Get a random word with its definition for word of the day',
      inputSchema: {
        type: 'object',
        properties: {
          difficulty: {
            type: 'string',
            enum: ['easy', 'medium', 'hard'],
            description: 'Difficulty level of the random word',
            default: 'medium',
          },
        },
        required: [],
      },
    },
  • src/index.ts:119-120 (registration)
    Dispatch registration in CallToolRequest handler switch statement, routing to the getRandomWord method.
    case 'get_random_word':
      return await this.getRandomWord(args);
Install Server

Other 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/Traves-Theberge/Word_of_the_day'

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