Skip to main content
Glama
Aaryan-Kapoor

MCP Character Tools

get_tricky_words

Identify words with double letters or repeated patterns that cause counting errors in language models, providing correct character counts and explanations.

Instructions

Get a list of words that are commonly miscounted by LLMs.

These are words with double letters, repeated patterns, or other features that cause counting errors.

Returns: List of tricky words with correct counts and explanations.

Example: Returns "strawberry" with explanation that it has 3 r's, not 2.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that processes and returns the list of tricky words, categorized by double letters and triple or more.
    export function getTrickyWords(): TrickyWordsOutput {
      const double_letters = TRICKY_WORDS.filter(w => w.count === 2);
      const triple_or_more = TRICKY_WORDS.filter(w => w.count >= 3);
    
      return {
        total_words: TRICKY_WORDS.length,
        words: TRICKY_WORDS,
        categories: {
          double_letters,
          triple_or_more,
        },
      };
    }
  • src/index.ts:489-513 (registration)
    MCP tool registration for 'get_tricky_words', importing and calling the handler with no input parameters, returning a formatted text response.
    server.registerTool(
      "get_tricky_words",
      {
        title: "Get Tricky Words",
        description: `Get a list of words that are commonly miscounted by LLMs.
    
    These are words with double letters, repeated patterns, or other features that cause counting errors.
    
    Returns: List of tricky words with correct counts and explanations.
    
    Example: Returns "strawberry" with explanation that it has 3 r's, not 2.`,
        inputSchema: z.object({}).strict(),
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      },
      async () => {
        const result = getTrickyWords();
        const summary = result.words
          .slice(0, 10)
          .map(w => `"${w.word}" '${w.letter}': ${w.count} (often miscounted as ${w.common_mistake})`)
          .join('\n');
        return {
          content: [{ type: "text" as const, text: `${result.total_words} tricky words in database.\n\nExamples:\n${summary}\n\n...and ${result.total_words - 10} more.` }],
        };
      }
    );
  • Output type definition for the getTrickyWords handler.
    export interface TrickyWordsOutput {
      total_words: number;
      words: TrickyWord[];
      categories: {
        double_letters: TrickyWord[];
        triple_or_more: TrickyWord[];
      };
    }
  • Data structure defining individual tricky words.
    export interface TrickyWord {
      word: string;
      letter: string;
      count: number;
      positions: number[];
      common_mistake: number;
      explanation: string;
  • Static data array of all tricky words with their letter counts, positions, common mistakes, and explanations, used by the handler.
    export const TRICKY_WORDS: TrickyWord[] = [
      {
        word: "strawberry",
        letter: "r",
        count: 3,
        positions: [2, 7, 8],
        common_mistake: 2,
        explanation: "The 'r' appears three times: st[r]awbe[r][r]y. LLMs often miss the double 'r' at the end.",
      },
      {
        word: "raspberry",
        letter: "r",
        count: 3,
        positions: [0, 6, 7],
        common_mistake: 2,
        explanation: "Three 'r's: [r]aspbe[r][r]y. The double 'r' near the end is often missed.",
      },
      {
        word: "occurrence",
        letter: "r",
        count: 2,
        positions: [4, 5],
        common_mistake: 1,
        explanation: "Two consecutive 'r's: occu[r][r]ence. Easy to count as one.",
      },
      {
        word: "occurrence",
        letter: "c",
        count: 3,
        positions: [1, 2, 8],
        common_mistake: 2,
        explanation: "Three 'c's: o[c][c]urren[c]e. The double 'c' at the start plus one later.",
      },
      {
        word: "necessary",
        letter: "s",
        count: 2,
        positions: [4, 5],
        common_mistake: 1,
        explanation: "Two consecutive 's's: nece[s][s]ary.",
      },
      {
        word: "accommodation",
        letter: "m",
        count: 2,
        positions: [4, 5],
        common_mistake: 1,
        explanation: "Two 'm's together: acco[m][m]odation.",
      },
      {
        word: "mississippi",
        letter: "s",
        count: 4,
        positions: [2, 3, 5, 6],
        common_mistake: 3,
        explanation: "Four 's's in pairs: mi[s][s]i[s][s]ippi.",
      },
      {
        word: "mississippi",
        letter: "i",
        count: 4,
        positions: [1, 4, 7, 10],
        common_mistake: 3,
        explanation: "Four 'i's spread throughout: m[i]ss[i]ss[i]pp[i].",
      },
      {
        word: "mississippi",
        letter: "p",
        count: 2,
        positions: [8, 9],
        common_mistake: 1,
        explanation: "Two 'p's together: mississi[p][p]i.",
      },
      {
        word: "entrepreneurship",
        letter: "r",
        count: 3,
        positions: [3, 6, 11],
        common_mistake: 2,
        explanation: "Three 'r's: ent[r]ep[r]eneu[r]ship. Spread across a long word.",
      },
      {
        word: "programming",
        letter: "r",
        count: 2,
        positions: [1, 4],
        common_mistake: 1,
        explanation: "Two 'r's: p[r]og[r]amming.",
      },
      {
        word: "programming",
        letter: "m",
        count: 2,
        positions: [6, 7],
        common_mistake: 1,
        explanation: "Two 'm's together: program[m][m]ing.",
      },
      {
        word: "banana",
        letter: "a",
        count: 3,
        positions: [1, 3, 5],
        common_mistake: 2,
        explanation: "Three 'a's: b[a]n[a]n[a]. The repeating pattern can confuse.",
      },
      {
        word: "assessment",
        letter: "s",
        count: 4,
        positions: [1, 2, 4, 5],
        common_mistake: 3,
        explanation: "Four 's's in two pairs: a[s][s]e[s][s]ment.",
      },
      {
        word: "committee",
        letter: "m",
        count: 2,
        positions: [2, 3],
        common_mistake: 1,
        explanation: "Two 'm's: co[m][m]ittee.",
      },
      {
        word: "committee",
        letter: "t",
        count: 2,
        positions: [5, 6],
        common_mistake: 1,
        explanation: "Two 't's: commi[t][t]ee.",
      },
      {
        word: "committee",
        letter: "e",
        count: 2,
        positions: [7, 8],
        common_mistake: 1,
        explanation: "Two 'e's at the end: committ[e][e].",
      },
      {
        word: "bookkeeper",
        letter: "o",
        count: 2,
        positions: [1, 2],
        common_mistake: 1,
        explanation: "Two 'o's: b[o][o]kkeeper.",
      },
      {
        word: "bookkeeper",
        letter: "k",
        count: 2,
        positions: [3, 4],
        common_mistake: 1,
        explanation: "Two 'k's: boo[k][k]eeper.",
      },
      {
        word: "bookkeeper",
        letter: "e",
        count: 3,
        positions: [5, 6, 8],
        common_mistake: 2,
        explanation: "Three 'e's: bookk[e][e]p[e]r.",
      },
    ];

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/Aaryan-Kapoor/mcp-character-tools'

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