Skip to main content
Glama

Character Counter (Japanese-aware)

count_characters
Read-onlyIdempotent

Count characters in a text exactly as KitBench's character counter does. Counts user-perceived characters (grapheme clusters: emoji sequences, combining marks and flags count as 1), plus counts excluding newlines and whitespace, half-width characters counted as 0.5, lines, paragraphs, Japanese manuscript paper (genkō yōshi, 20x20) sheets, UTF-8 bytes, English words, and a breakdown into hiragana, katakana, kanji, Latin letters, digits and other. Strong for Japanese text and character limits. Text up to 200,000 characters.

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_characters"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to count (max 200,000 characters).
limitNoOptional character limit; the result then shows how many characters remain or are over.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds genuinely new behavioral detail: how grapheme clusters, combining marks, flags and half-width characters are treated, and the 200,000-character ceiling. It does not describe performance or error behavior, keeping it short of a 5.

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

Conciseness4/5

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

Purpose and counting semantics are front-loaded in the first sentence, with the enumerated output list and the size ceiling following. The single dense paragraph is all signal, though the long metric list is slightly unwieldy.

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

Completeness5/5

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

There is no output schema, so the description must carry the return-value burden, and it does: it enumerates grapheme counts, newline/whitespace-excluded counts, half-width weighting, lines, paragraphs, genkō yōshi sheets, UTF-8 bytes, English words and script breakdown. Nothing an agent needs to call or interpret this tool is missing.

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?

Schema coverage is 100%, so both parameters are already documented by the schema, including the limit parameter's remain/over behavior. The description reinforces the input size constraint but adds no syntax or format meaning beyond what the schema states, making the baseline 3 appropriate.

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

Purpose5/5

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

States a specific verb (count) and resource (characters in a text) and enumerates the exact metrics returned, so the agent knows precisely what this tool produces. The counting semantics (grapheme clusters, half-width as 0.5) clearly separate it from the unrelated date/unit/tax siblings.

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?

The phrase 'Strong for Japanese text and character limits' implies the appropriate use case, and sizes are bounded ('up to 200,000 characters'). However, there is no explicit when-to-use vs when-not guidance and no alternatives are named, leaving usage to inference.

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.

Resources