Skip to main content
Glama

Count words and characters

count_text
Read-onlyIdempotent

Count words, code points, graphemes, sentences, and paragraphs, and compare the length with SEO and social limits.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "count_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to count.

Output Schema

NameRequiredDescriptionDefault
linesYes
wordsYes
graphemesYes
platformsYes
sentencesYes
charactersYes
paragraphsYes
uniqueWordsYes
readingLabelYes
speakingLabelYes
charactersNoSpacesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is fully covered structurally. The description adds one genuine behavioral detail beyond that: it not only counts but compares results against SEO and social limits. It stops short of saying which limits are applied or whether that comparison is always returned.

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?

A single front-loaded sentence with the verb first and the measured units grouped, then the limit-comparison payoff. No filler, no restatement of the title's redundant phrasing, and nothing an agent has to skim past.

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

Completeness4/5

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

For a one-parameter, read-only utility with an output schema that defines return values, the description covers the counted units and the added limit-comparison behavior. The only residual gap is specificity about which limits are compared, which is minor since the tool takes no limit parameter.

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?

There is a single parameter with 100% schema description coverage, so the schema already fully documents 'text'. The description adds no meaning about the input (no note on the 200000-character ceiling or on how graphemes vs code points affect the input). Baseline 3 applies when the schema carries the parameter burden.

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 opens with a specific verb ('Count') and enumerates the exact units measured (words, code points, graphemes, sentences, paragraphs) plus the limit-comparison feature, so the resource and output are unambiguous. It does not name the closest sibling, count_tokens, so an agent must infer the boundary between character/word counting and tokenization.

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

Usage Guidelines3/5

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

Usage is only implied: the mention of SEO and social limits signals the intended scenario (checking copy length against platform caps). There is no explicit when-to-use versus count_tokens, no statement of what happens when text exceeds the 200000-character cap, and no exclusions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.