Skip to main content
Glama

Count words, sentences and pages

count_text
Read-onlyIdempotent

Counts words, characters, sentences and paragraphs, then estimates page count for selected font, size and spacing, plus reading time.

Instructions

Count the words, characters, sentences and paragraphs in a text, and estimate how many pages it fills at a given font, font size and line spacing. Inputs: text, and optional font (times new roman, arial, calibri, georgia, courier new or verdana, default times new roman), font_size in points (default 12) and spacing (single, 1.5 or double, default double). The page count is an estimate from typical words per page, so a word processor may differ by a little. Also returns an estimated reading time at 238 words per minute. Example: "Count the words in this essay and estimate the pages in Times New Roman 12 double spaced."

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": "count_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
fontNoFont name. Default times new roman.
textYes
spacingNoLine spacing. Default double.
font_sizeNoFont size in points. Default 12.

Output Schema

NameRequiredDescriptionDefault
fontYes
wordsYes
spacingYes
font_sizeYes
sentencesYes
charactersYes
paragraphsYes
estimated_pagesYes
reading_minutesYes
characters_no_spacesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavioral context beyond that: the page count is an estimate derived from typical words per page and may differ from a word processor, and reading time is computed at a fixed 238 words per minute.

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 core purpose and outputs, then parameter defaults, then the estimation caveat, then an example that earns its place by showing a realistic phrasing. Dense but not padded; the restatement of schema defaults is the only mild waste.

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?

All four parameters have documented semantics and defaults, the one ambiguous parameter (font) is constrained in prose, the estimation limitation is disclosed, and an output schema exists so return values need not be spelled out. Nothing an agent needs in order to call this 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 75%, and the description meaningfully compensates for the gap: the `font` parameter is an unconstrained string in the schema, but the description enumerates the accepted fonts (times new roman, arial, calibri, georgia, courier new, verdana). Defaults for font, font_size and spacing are restated from the schema, which is redundant but harmless.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb set (count, estimate) and a concrete resource: word/character/sentence/paragraph counts plus an estimated page count. It is immediately distinguishable from siblings like check_word_limit or readability_scores by the page-estimation framing, but it never names those siblings explicitly.

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 rather than stated: the worked example ('Count the words in this essay and estimate the pages in Times New Roman 12 double spaced') shows a typical call, but there is no when-to-use versus check_word_limit or word_frequency, and no exclusions. The agent must infer selection from the sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.