Skip to main content
Glama
frogr
by frogr

Book statistics

book_stats
Read-onlyIdempotent

Compute word count, unique words, sentence length, reading time, and chapter extremes for any Project Gutenberg book. Get deterministic stats without model involvement.

Instructions

Compute statistics for a Project Gutenberg book: word count, unique words, average sentence and word length, reading time, most frequent content words, and the longest and shortest chapters. Deterministic counting, no model involved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesProject Gutenberg book id, e.g. 2701 (Moby Dick) or 1342 (Pride and Prejudice). Find ids with search_books.
top_nNoHow many most-frequent words to list (5-50, default 20).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
noteNo
titleNo
top_wordsYesMost frequent words, excluding English function words, Mr/Mrs and numbers.
line_countYes
word_countYes
attributionYesCredit line to keep with any quoted text.
unique_wordsYesDistinct lowercased word forms.
chapter_countYes
sentence_countYesApproximate: ends of sentences found by punctuation, skipping common abbreviations like Mr.
longest_chapterNo
shortest_chapterNo
type_token_ratioYesunique_words / word_count. Falls naturally as books get longer, so compare books of similar length.
reading_time_minutesYesAt 238 words per minute.
avg_word_length_charsYes
avg_sentence_length_wordsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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, destructiveHint=false and openWorldHint=true, so safety is covered. The description adds a meaningful behavioral trait beyond them: results come from deterministic counting rather than a model, so outputs are reproducible and non-hallucinated. It does not, however, note failure modes (e.g., network fetch errors for openWorld access) or performance characteristics.

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?

Two sentences, front-loaded with the verb and resource, and the metric list is justified because it tells the agent what the tool returns without opening the output schema. Slightly dense but no wasted sentences.

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?

With a full output schema, rich annotations, and 100% parameter coverage, the description only needs to convey what is computed and that it is deterministic — which it does. Minor remaining gap: no note that fetching book text may depend on external availability despite openWorldHint.

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%, and the schema already documents id (with examples and a pointer to search_books) and top_n (range and default). The description adds no additional parameter semantics, so the baseline 3 applies.

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 (Compute) and resource (statistics for a Project Gutenberg book), then enumerates the exact metrics produced (word count, unique words, sentence/word length, reading time, frequent words, chapter extremes). This clearly separates it from metadata-oriented siblings like get_book or search_books.

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 enumerated metrics, but there is no explicit when-to-use/when-not statement or named alternative among siblings (get_book, read_passage, find_in_book). The 'deterministic counting, no model involved' note hints at reliability rather than routing guidance.

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