Skip to main content
Glama

Letter Counter MCP Server

by scaryrawr
letterCounter.ts347 B
export function countLetterOccurrences(word: string, letter: string): number { if (letter.length !== 1) { throw new Error("The letter parameter must be a single character."); } const lowerWord = word.toLowerCase(); const lowerLetter = letter.toLowerCase(); return lowerWord.split("").filter((char) => char === lowerLetter).length; }

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/scaryrawr/strawberry-mcp'

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