Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Tools

Functions exposed to the LLM to take actions

NameDescription
count_letter

Count occurrences of a specific letter in text.

Returns the count, positions, a visual breakdown showing where each letter appears, and a density percentage.

Args:

  • text (string): The text to analyze

  • letter (string): The single letter to count

  • case_sensitive (boolean): Whether to match case exactly (default: false)

Returns: count, positions array, visual breakdown, and density summary.

Example: count_letter("strawberry", "r") → count: 3, positions: [2, 5, 8]

count_letters

Count occurrences of multiple letters at once.

Efficiently counts several letters in a single call.

Args:

  • text (string): The text to analyze

  • letters (string[]): Array of letters to count

  • case_sensitive (boolean): Match case exactly (default: false)

Returns: Results for each letter with counts and positions.

Example: count_letters("strawberry", ["r", "s", "e"]) → r: 3, s: 1, e: 1

count_substring

Count occurrences of a substring or pattern in text.

Can count overlapping or non-overlapping matches.

Args:

  • text (string): The text to search in

  • substring (string): The pattern to find

  • case_sensitive (boolean): Match case exactly (default: false)

  • overlapping (boolean): Count overlapping matches (default: false)

Returns: count and positions of each match.

Example: count_substring("banana", "ana", overlapping=true) → count: 2, positions: [1, 3]

letter_frequency

Get frequency distribution of all characters in text.

Provides a complete breakdown of character frequencies.

Args:

  • text (string): The text to analyze

  • case_sensitive (boolean): Distinguish upper/lowercase (default: false)

  • include_spaces (boolean): Include spaces in count (default: false)

  • include_punctuation (boolean): Include punctuation (default: false)

  • letters_only (boolean): Only count a-z letters (default: true)

Returns: Frequency map, sorted list, most/least common characters.

Example: letter_frequency("hello") → h: 1, e: 1, l: 2, o: 1

spell_word

Break text into individual characters with optional indices.

Perfect for verifying character-by-character content.

Args:

  • text (string): The text to spell out

  • include_indices (boolean): Include position numbers (default: true)

Returns: Array of characters, indexed list, spelled out string.

Example: spell_word("cat") → ['c', 'a', 't'] with indices [0:'c', 1:'a', 2:'t']

char_at

Get the character at a specific index (0-based). Supports negative indices.

Args:

  • text (string): The text to index into

  • index (number): Position (0-based, negative counts from end)

Returns: The character at that position, or error if out of bounds.

Example: char_at("hello", 1) → 'e'; char_at("hello", -1) → 'o'

nth_character

Get the nth character (1-based, human-friendly numbering).

"What's the 3rd letter?" uses position=3.

Args:

  • text (string): The text to examine

  • position (number): Which character (1 = first, 2 = second, etc.)

  • from_end (boolean): Count from end instead (default: false)

Returns: The character and a human-readable description.

Example: nth_character("hello", 2) → 'e' (the 2nd character)

word_length

Get the exact length of text with detailed breakdown.

Args:

  • text (string): The text to measure

  • count_spaces (boolean): Include spaces in length (default: true)

Returns: Total length, length without spaces, space count, word count.

Example: word_length("hello world") → 11 total, 10 without spaces, 2 words

reverse_text

Reverse text character-by-character or word-by-word.

Also detects if the text is a palindrome.

Args:

  • text (string): The text to reverse

  • reverse_words_only (boolean): Reverse word order only, not characters (default: false)

Returns: Reversed text, palindrome detection.

Example: reverse_text("hello") → "olleh"; reverse_text("racecar") → "racecar" (palindrome!)

compare_texts

Compare letter frequencies between two texts.

Useful for analyzing similarity or differences.

Args:

  • text1 (string): First text

  • text2 (string): Second text

  • case_sensitive (boolean): Distinguish case (default: false)

Returns: Common characters, unique to each, frequency comparison, similarity score.

Example: compare_texts("hello", "world") → common: ['l', 'o'], unique_to_text1: ['h', 'e'], etc.

analyze_sentence

Analyze a sentence word-by-word for a specific letter.

Shows exactly how many times a letter appears in each word.

Args:

  • text (string): The sentence to analyze

  • letter (string): The letter to count

  • case_sensitive (boolean): Match case exactly (default: false)

Returns: Per-word breakdown with counts and positions.

Example: analyze_sentence("The strawberry was very ripe", "r") → per-word counts

batch_count

Count a letter across multiple words at once.

Efficiently process a list of words.

Args:

  • words (string[]): Array of words to analyze

  • letter (string): The letter to count

  • case_sensitive (boolean): Match case exactly (default: false)

Returns: Results for each word, totals, sorted by count.

Example: batch_count(["strawberry", "raspberry", "blueberry"], "r") → individual and total counts

get_tricky_words

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.

check_tricky_word

Look up a specific word to see if it's a commonly miscounted word.

Args:

  • word (string): The word to check

Returns: Information about common mistakes if it's a tricky word, or empty if not.

Example: check_tricky_word("strawberry") → explains the 3 r's and common mistake of counting 2

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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