Skip to main content
Glama

Count characters, words, lines, bytes

count
Read-onlyIdempotent

Accurately count characters (Unicode code points), UTF-16 units, words, lines and UTF-8 bytes in text. LLMs are notoriously bad at counting, so always use this tool for "how many characters/words" questions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesText to measure.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesYesUTF-8 bytes.
linesYes
wordsYes
charactersYesUnicode code points.
utf16_unitsYes

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds context about what is counted (Unicode code points vs UTF-16 units vs UTF-8 bytes), which is useful behavioral detail beyond the annotations. It does not describe return format or edge cases, but given the annotations cover the main risks, a score of 3 is appropriate.

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 two sentences, both earning their place. The first lists the countable units, the second gives a compelling usage guideline. No filler or redundant phrasing. It is well-structured and front-loaded with the core functionality.

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?

The tool is simple with one parameter, full schema coverage, and an output schema present (as indicated by context signals). The description covers the purpose, usage context, and accuracy guarantees. It is complete for a tool of this complexity.

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 description coverage is 100%: the input parameter has the description 'Text to measure.' which fully explains its purpose. The tool description adds no additional parameter-level detail beyond what the schema provides, so the baseline score of 3 is retained.

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?

The description clearly states what the tool does: 'Accurately count characters (Unicode code points), UTF-16 units, words, lines and UTF-8 bytes in text.' It uses a specific verb ('count') and a specific resource (text), and enumerates the exact metrics. This distinguishes it from sibling utility tools like base64 or json_format, which serve different purposes.

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

Usage Guidelines4/5

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

The description provides explicit guidance on when to use the tool: 'LLMs are notoriously bad at counting, so always use this tool for "how many characters/words" questions.' This clearly communicates the intended use case. However, it does not explicitly mention when not to use it or name alternative tools, though the sibling set makes alternatives obvious.

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.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: base64 encoding, color conversion, string counting, hashing, image format comparison, JSON formatting, JWT decoding, image optimization, QR code generation, slugification, storage capacity calculation, and UUID generation. No two tools overlap in functionality.

Naming Consistency4/5

Tool names are mostly consistent using lowercase and underscores, but they mix patterns: some are nouns (color, hash, uuid), some verbs (count, slugify), and some verb_noun pairs (jwt_decode, optimize_image). This minor inconsistency is still readable.

Tool Count5/5

With 12 tools, the count is well within the ideal range. Each tool serves a specific and useful utility function, making the set well-scoped for a general-purpose developer toolkit.

Completeness4/5

The tool set covers a broad range of common web development utilities (encoding, colors, hashing, JSON, images, UUIDs). Minor gaps like URL encoding or HTML escaping are missing, but the core functionalities are well-represented.