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 €15/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
Behavior5/5

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

Beyond the readOnly/idempotent/openWorld annotations, the description discloses server-side execution, immediate file deletion with no storage, a free-tier rate limit of 5 calls/day per IP, and two paid paths (Radar API key via X-API-Key, or $0.001/call via x402). Those are exactly the auth, quota and data-retention facts an agent needs before calling, and none are derivable from the annotations or schema.

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?

Capabilities are front-loaded in one dense sentence, then the privacy note, then the access/pricing terms. Every clause carries information, though the pricing URL with an anchor plus the x402 endpoint is heavier commercial detail than the task requires and could be compressed.

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-input, read-only utility with no output schema, the description effectively enumerates the returned metrics and fully covers operational constraints like rate limits and auth. The remaining gap is that it never states the response shape (e.g., whether results come back as named fields per platform) or any input length ceiling.

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 and schema coverage is 100%, with the field already described as 'Text to measure', so the baseline of 3 applies. The description adds no extra semantics for that argument: it never states a maximum input size, whether newlines count, or whether trimming/normalization occurs before counting.

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 opens with a specific verb ('Count') and then enumerates exactly which quantities are produced: characters with/without spaces, words, lines, UTF-8 bytes, X/Twitter weighted count with URL and emoji rules, SMS GSM-7 vs UCS-2 segments, and remaining space for Instagram/YouTube/SEO. This enumeration is detailed enough that an agent can distinguish it from the word-counting sibling even though that sibling is never named.

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 clear: it is framed around platform limit checks (X/Twitter, SMS, Instagram, YouTube, Google SEO), so the agent knows the intended task is validating text against a channel limit. What is missing is any exclusion or alternative routing (e.g., when to prefer word_counter for a plain word tally), 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