feat(tools): add get_random_words_from_list tool

This commit is contained in:
2026-02-22 19:15:23 -06:00
parent 8e353dce44
commit 98223c8312

View File

@@ -33,4 +33,19 @@ export const addRandomWordsTool = (server: McpServer) => {
}
}
)
server.registerTool(
"get_random_words_from_list",
{
title: "Get Random Word From List",
description: "Get a list of random words from a list of words.",
inputSchema: z.object({
words: z.array(z.string()),
count: z.number().optional().default(1)
})
},
async (input) => {
return { content: [{ type: "text", text: getRandomWords(input.words, input.count).join("\n") }] }
}
)
}