Skip to main content
Glama

Sentence variety

sentence_variety
Read-onlyIdempotent

Analyze sentence length variation in an essay to reveal rhythm problems. Returns shortest, longest and average lengths, standard deviation, short/medium/long counts, and runs of same-length sentences.

Instructions

Show how much the sentence lengths in an essay change, since a good rhythm mixes short, medium and long sentences. Input: text. Returns the shortest, longest and average sentence length in words, the standard deviation, how many sentences are short (under 10 words), medium (10 to 24) and long (25 or more), and any runs of 3 or more sentences in a row whose lengths are within 3 words of the first one in the run, with their sentence numbers. Sentence numbers start at 1 and follow the order of the text. This is a simple measure of rhythm, so treat it as a prompt to reread. Example: "Do my sentences all sound the same length?"

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

Input Schema

NameRequiredDescriptionDefault
textYes

Output Schema

NameRequiredDescriptionDefault
lengthsYes
sentencesYes
long_countYes
short_countYes
medium_countYes
similar_runsYes
average_wordsYes
longest_wordsYes
std_dev_wordsYes
shortest_wordsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only/idempotent/closed-world safety, and the description adds the key caveat that this is a simple heuristic measure to be treated as a prompt to reread. It also specifies thresholds (short <10, medium 10-24, long >=25) and the run definition, which set expectations for interpretation.

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 purpose, then the return contents, then the caveat and example. The enumerated return contents largely restate what the output schema already carries, which is mildly redundant, but every part is readable and organized.

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 the return-value enumeration is extra rather than necessary, but the description still supplies the interpretive caveat and thresholds an agent needs to use results sensibly. Only the input parameter's expected form is under-described.

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?

Only one parameter with 0% schema description coverage; the description says 'Input: text' but doesn't specify that it should be full essay prose, nor any length or format constraint. Minimal compensation for the coverage gap, though the context makes the input obvious.

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 and resource: measures how much sentence lengths in an essay vary, and explains the rationale (good rhythm mixes short, medium and long). The scope (sentence-length distribution and rhythm) is clearly distinct from sibling counts and readability tools.

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?

Provides a concrete triggering question ('Do my sentences all sound the same length?') and frames the result as a prompt to reread rather than a verdict. It doesn't explicitly name alternatives like readability_scores or style_flags, so the when-not guidance is implied rather than stated.

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