Skip to main content
Glama
qpd-v

MCP Word Counter

by qpd-v

MCP Word Counter

A Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.

Features

  • Count words in documents

  • Count total characters (including spaces)

  • Count characters excluding spaces

  • Process files directly without exposing content to LLMs

Related MCP server: Letter Counter MCP Server

Installation

npm install mcp-wordcounter

Usage

As a CLI tool

npx mcp-wordcounter

In Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "mcp-wordcounter": {
      "command": "npx",
      "args": ["-y", "mcp-wordcounter"],
      "alwaysAllow": ["analyze_text"]
    }
  }
}

Available Tools

analyze_text

Counts words and characters in a text document.

Parameters:

  • filePath (string, required): Path to the text file to analyze

Returns:

  • Word count

  • Character count (including spaces)

  • Character count (excluding spaces)

Example response:

{
  "content": [{
    "type": "text",
    "text": "Analysis Results:\n• Word count: 150\n• Character count (including spaces): 842\n• Character count (excluding spaces): 702"
  }]
}

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run in watch mode during development
npm run watch

# Test with MCP Inspector
npm run inspector

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Available Tools

1 tool
analyze_textC

Count words and characters in a text document

ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the text file to analyze

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions counting words and characters but does not describe how the tool behaves, such as whether it reads files safely, handles errors, or returns specific formats. For a tool with no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand quickly. Every part of the sentence contributes to clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, error handling, or return values, which are crucial for an agent to use the tool correctly. For a tool with such minimal structured data, the description should provide more context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'filePath' clearly documented. The description does not add any additional meaning or details about parameters beyond what the schema provides. According to the rules, with high schema coverage, the baseline score is 3, as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function as 'Count words and characters in a text document,' which specifies the verb (count) and resources (words, characters). It distinguishes the tool's purpose well, though without sibling tools, differentiation isn't needed. It's not a tautology and is specific enough for understanding.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or exclusions. It simply states what the tool does without context for usage, leaving the agent to infer based on the purpose alone. This lack of explicit guidelines reduces its helpfulness.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.1/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'analyze_text' has a single, clearly defined purpose of counting words and characters, so an agent cannot misselect between non-existent alternatives.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'analyze_text' follows a clear verb_noun pattern, which would be consistent if more tools were added.

Tool Count2/5

The server 'MCP Word Counter' has only one tool, which feels thin for its apparent scope of text analysis. While word and character counting is a specific task, a typical text analysis server might include additional tools (e.g., for sentiment, readability, or language detection) to provide more comprehensive functionality.

Completeness2/5

The tool set is severely incomplete for a text analysis domain. It only covers basic word and character counting, with obvious gaps such as sentence counting, paragraph analysis, frequency analysis, or other common text metrics. This limited surface will likely cause agent failures when more advanced text processing is needed.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    A Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.
    13
    37
    174
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides tools for text file analysis, including metrics like word counts and character frequencies, alongside file reading and directory browsing capabilities. This server enables LLMs to interact with and process local file content securely through the Model Context Protocol.
    MIT

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/qpd-v/mcp-wordcounter'

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