Skip to main content
Glama

text_stats

Read-onlyIdempotent

utilpeek: Count words and score the readability of a text. For word frequencies use text_frequency. Returns counts (characters, letters, words, unique words, sentences, paragraphs, averages), reading and speaking time, and for English the Flesch reading ease, Flesch-Kincaid grade, Gunning fog, SMOG, Coleman-Liau and ARI scores (estimates from heuristic syllable counts; Dale-Chall is not offered); German Flesch (Amstad) and Wiener Sachtextformel, Spanish Szigriszt-Pazos, Italian Gulpease. An unsupported lang is a 422 invalid_lang and text without words a 422 no_words (not charged). Word counts undercount scripts written without spaces. Typically under 0.2 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. The submitted text is never logged or stored. Docs: https://tanod.dev/learn/text-statistics-api.html

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "text_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoISO 639 code (default en); readability scores for en, de, es and it; any other language gets counts only.
textYesThe text (at most 200,000 characters).

Output Schema

NameRequiredDescriptionDefault
langNo
noteNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
countsNo
sourceNo
syllablesNo
readabilityNo
reading_time_secondsNo
speaking_time_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / lang / description
      Previous value: -"ISO 639 code; readability scores are computed for English only (default en); any other language gets counts only."New value: +"ISO 639 code (default en); readability scores for en, de, es and it; any other language gets counts only."
  2. Changed7 schema fields changed
    • removedInput schema / properties / lang / default
      Removed value: -null
    • removedInput schema / properties / lang / title
      Removed value: -"Lang"
    • removedInput schema / properties / text / title
      Removed value: -"Text"
    • removedInput schema / title
      Removed value: -"text_statsArguments"
    • removedOutput schema / properties / counts / properties
      Removed value: -{
      -  "avg_sentence_words": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "avg_word_length": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "characters": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "characters_no_spaces": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "letters": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "paragraphs": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "sentences": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "unique_words": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "words": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / readability / properties
      Removed value: -{
      -  "automated_readability_index": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "coleman_liau_index": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "dale_chall": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "flesch_kincaid_grade": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "flesch_reading_ease": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "flesch_reading_ease_label": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "gunning_fog": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "smog_index": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / source / properties
      Removed value: -{
      -  "library": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "license": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
  3. Changed1 schema field changed
    • addedOutput schema / properties / readability / properties / flesch_reading_ease_label
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "counts": {
      +      "properties": {
      +        "avg_sentence_words": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "avg_word_length": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "characters": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "characters_no_spaces": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "letters": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "paragraphs": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "sentences": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "unique_words": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "words": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "lang": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "readability": {
      +      "properties": {
      +        "automated_readability_index": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "coleman_liau_index": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "dale_chall": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "flesch_kincaid_grade": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "flesch_reading_ease": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "gunning_fog": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "smog_index": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "reading_time_seconds": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "properties": {
      +        "library": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "license": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "speaking_time_seconds": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "syllables": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  5. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover read-only/idempotent/non-destructive, yet the description adds charge semantics (422 no_words not charged), per-IP daily free quota, price, latency, privacy guarantee that text is never stored, and a heuristic-syllable caveat plus undercount warning. These are non-obvious behaviors an agent could not infer from structured fields.

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 purpose and sibling routing, then packs output/error/pricing notes economically. The long formula enumeration is dense but each clause carries information; only minor trimming is possible.

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?

For a read-only text-analysis tool with an output schema and full annotation coverage, the description covers outputs, errors, cost, rate limits, privacy, and caveats. Nothing an agent needs to call it correctly is missing.

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 coverage is 100%, so baseline is 3, but the description adds meaning: unsupported lang yields 422 invalid_lang, and it enumerates which readability formulas apply per language (Amstad, Wiener Sachtextformel, Gulpease), which exceeds the schema's generic 'en, de, es, it' note. It does not explain text length limits beyond the schema.

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 pair (count words, score readability) and resource (a text), and explicitly contrasts with the sibling text_frequency for word frequencies. An agent can distinguish it from text_frequency and text_sentiment without opening a schema.

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?

Names the alternative (text_frequency) and the condition that selects it, and implies scope via 'peek' pricing/free-tier notes. It doesn't state explicit exclusions beyond word frequencies, so it falls just 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