@dennisk2025/text-shuffle-words
v1.0.0
Published
Rearranges words of a sentence in random order, preserving punctuation. Useful for language games, creativity tools, or testing.
Readme
text-shuffle-words
A Model Context Protocol (MCP) server that rearranges the words of a given sentence in a random order, preserving spaces and all original punctuation attached to words. Useful for language games, creativity tools, or testing language models with shuffled text.
Features
- Rearranges words in sentences randomly
- Preserves all spacing and punctuation attached to words
- Simple, robust tool for language creativity
Installation
You can run this server directly via NPX (no global install needed):
npx @dennisk2025/text-shuffle-wordsOr install globally/local for custom integration:
npm install -g @dennisk2025/text-shuffle-wordsAdding to Claude Desktop
Add the following to your claude_desktop_config.json config file:
{
"mcpServers": {
"shufflewords": {
"command": "npx",
"args": ["@dennisk2025/text-shuffle-words"]
}
}
}- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Usage Examples
Tool: shuffle_words
Description: Rearranges the words of a given sentence in a random order, maintaining spaces and original punctuation attached to each word.
Parameters:
sentence(string, required): The sentence whose words should be shuffled.
Example Call:
{
"name": "shuffle_words",
"arguments": {
"sentence": "Hello, world! Let's shuffle this sentence."
}
}Example Result:
{
"result": "this Let's world! sentence. shuffle Hello,"
}Available Tools
| Name | Description | |----------------|-----------------------------------------------------------------------------------------------------| | shuffle_words | Takes a sentence and returns a new sentence with its words randomly shuffled, preserving punctuation |
Tool Details
- shuffle_words:
- Parameters:
sentence(string, required): A sentence to shuffle word order.
- Returns:
{ "result": "..." }with the shuffled sentence as a string.
- Parameters:
Error Handling
- If you provide an empty or missing
sentence, the server will respond with an error message.
For issues or suggestions, please open an issue on the relevant ecosystem or contact the author.
