Skip to main content
Glama

MAD Synapse · Utils

Text stats + token estimate

text_stats
Read-onlyIdempotent

Count characters, words, sentences, lines and paragraphs, estimate LLM tokens, reading time and readability (Flesch), and pull out every URL, email, @handle, #tag, number and crypto address. Token count is an estimate (~4 characters per token for English; code and non-Latin scripts differ). Extraction uses strict patterns; EVM addresses are checksum-validated. Price: free. Errors: returns isError with a message for invalid input or an upstream failure (not charged).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText (or a URL when extract=true) to analyse.
extractNotrue = if text is a URL, fetch the page and analyse its readable text. Default true.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNo
wordsNo
extractedNo
sentencesNo
charactersNo
paragraphsNo
readabilityNo
reading_minutesNo
estimated_tokensNo
flesch_reading_easeNo
characters_no_spacesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/destructive/openWorld, so the bar is lower, yet the description adds real context: token count is an approximation with the ~4 chars/token caveat, extraction uses strict patterns, EVM addresses are checksum-validated, the tool is free, and errors surface via isError without being charged. Missing only rate-limit or response-shape notes.

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 capability list, followed by useful qualifiers on token estimation, extraction strictness, pricing, and errors. Dense but each sentence carries information; no 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?

An output schema exists so return values need no explanation. The description covers the main behavioral caveats, error mode, and pricing, leaving only minor gaps such as limits on input size or network-fetch cost.

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%, so the baseline is 3. The description reinforces the extract-URL behavior and adds a caveat about token estimation accuracy, but does not add much meaning beyond what the schema already documents for text and extract.

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 specific verbs and resources: counting characters/words/sentences/lines/paragraphs, estimating tokens, reading time, Flesch readability, and extracting URLs/emails/handles/tags/numbers/crypto addresses. This is clearly distinguishable from siblings like text_diff and markdown_convert.

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 enumeration of capabilities, but there is no explicit guidance on when to prefer this over e.g. web_read or text_diff, nor any stated exclusions or prerequisites. The extract parameter hints at web-page analysis but the routing condition is not spelled out.

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