Skip to main content
Glama
YeTor53

chinese-char-counter-mcp

by YeTor53

count_chinese_characters

Read-onlyIdempotent

Count Chinese characters in text while ignoring punctuation, spaces, letters, digits, and emoji. Returns total, ratio, and category breakdown for copy, homework, or title length checks.

Instructions

统计一段文本的中文字数(不算标点、空格、英文字母、数字等)。

Args: text: 待统计的文本,长度上限 200000 个字符。

Returns: chinese_count 为中文字数(CJK 表意文字,含扩展区与“〇”); total_characters 为文本总字符数(含标点、空格等全部字符); chinese_ratio 为中文占全部字符的比例(保留 4 位小数); breakdown 为分项计数:chinese/letters/digits/punctuation/spaces/other; error 为失败原因,成功时为空字符串。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorYes
breakdownYes
chinese_countYes
chinese_ratioYes
total_charactersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 destructiveHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: a 200,000-character input limit and the fact that failures surface via an 'error' field rather than throwing. That is useful but not rich; no mention of performance implications at the upper length bound.

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?

Front-loads the one-line purpose, then separates Args and Returns cleanly. The Returns block is somewhat long given an output schema already exists, which is mild redundancy, but every element remains readable and no sentence is pure filler.

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 single-parameter counting tool with annotations and an output schema, the definition covers input limits, scope of the count, and error signaling. The main gap is sibling disambiguation, which the description leaves entirely to the agent.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must carry the parameter alone, and it does: it defines 'text' as the text to be counted and gives a concrete 200,000-character upper bound. That is the key semantic an agent needs before calling, though nothing is said about encoding or multibyte handling.

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 states a specific verb+resource (counting Chinese characters in a text) and precisely scopes what counts (CJK ideographs including extensions and '〇', excluding punctuation, spaces, letters, digits). It does not, however, distinguish itself from its siblings count_chinese_characters_batch or extract_chinese_text, so an agent must infer the division of labor.

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 implied by the narrowly defined scope of what gets counted, letting an agent infer this is the single-text counter. But there is no explicit when-to-use statement, no mention that a batch sibling exists for multiple texts, and no guidance on selection versus extract_chinese_text.

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