Skip to main content
Glama

Character Counter API - counts, UTF-8 bytes, X/Twitter, SMS segments & SEO limits

character_counter
Read-onlyIdempotent

Count characters (with and without spaces), words, lines, UTF-8 bytes, X/Twitter weighted character count (23-char URLs, emoji weight), SMS GSM-7 vs UCS-2 segment count, and remaining space for Instagram, YouTube and Google SEO. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/character-counter.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "Hello world! Check https://example.com/page"
    },
    "name": "character_counter"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to measure

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Adds substantial behavior beyond the readOnly/idempotent/openWorld annotations: server-side execution, immediate file deletion, no storage, a 5-calls/day free tier per IP, and two paid paths (X-API-Key header or x402 per-call). What's missing is any hint about response shape or latency, but the operational constraints are unusually well disclosed.

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-loaded with the metric list, which is the single most important selection signal, followed by privacy, rate limit, and pricing. It is dense but every clause is informational; the pricing URL and per-call cost are the weakest-earning sentences but still affect agent behavior on repeated calls.

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?

There is no output schema, and the description compensates by enumerating exactly the measurements returned, which is what an agent needs to decide whether the result answers its question. It does not specify the response format or field names, a minor gap for a no-output-schema tool.

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?

Only one parameter and the schema already documents it at 100% coverage, so the baseline is 3. The description adds meaning by showing the kind of text expected (URLs weighted at 23 chars, emoji weighting), which tells the agent that raw text with links and emoji is acceptable input.

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) plus an explicit, enumerated scope of metrics — characters with/without spaces, words, lines, UTF-8 bytes, X/Twitter weighted counts, SMS GSM-7 vs UCS-2 segments, and SEO remaining space. This precisely delimits it against siblings like word_counter, which only covers one of those metrics.

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?

Usage context is implied strongly by the platform-limit framing (X/Twitter, SMS, Instagram, YouTube, Google SEO), so an agent knows when this tool fits. It does not explicitly say when NOT to use it or name word_counter as the narrower alternative, so it stops short of a 5.

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