Skip to main content
Glama

Check a word limit

check_word_limit
Read-onlyIdempotent

Checks an essay against a word limit by counting words, optionally excluding references or quotes, and reports how many words remain or exceed the limit.

Instructions

Compare an essay against a word limit. Inputs: text, limit (the maximum word count), optional minimum (a lower bound), optional tolerance_percent (how far over the limit is still acceptable, default 0, a common rule is 10), optional exclude_references (cut everything from a heading line such as References, Works Cited or Bibliography to the end) and optional exclude_quotes (leave out block quotes that start with > and text inside double quotes). Returns the counted words, how many are left or over, and what was excluded. Example: "Is this under 2000 words if I leave out the works cited and quotes?"

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>",
      "limit": "<limit>"
    },
    "name": "check_word_limit"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
limitYesMaximum number of words.
minimumNoMinimum number of words.
exclude_quotesNoLeave out quoted passages. Default false.
tolerance_percentNoPercent over the limit that is still fine. Default 0.
exclude_referencesNoLeave out the references section. Default false.

Output Schema

NameRequiredDescriptionDefault
limitYes
statusYes
minimumYes
words_overYes
total_wordsYes
counted_wordsYes
allowed_maximumYes
words_remainingYes
excluded_quote_wordsYes
excluded_reference_wordsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world, so the safety profile is covered. The description then adds genuinely non-obvious behavior: the common 10% tolerance rule, that exclusion starts at a heading line and cuts to the end, and that block quotes starting with > and double-quoted text are dropped. It also hints at the return shape (counted words, over/under, what was excluded).

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 purpose and then a compact per-input rundown followed by the return summary and an example. It is one dense paragraph and slightly list-like, but nearly every clause carries operational meaning; only the trailing example partially restates earlier content.

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?

An output schema exists, so the brief return-value sentence is sufficient, and all six parameters (including defaults and exclusion semantics) are accounted for. 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.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 83%, yet the description still adds meaning beyond it: exclude_references is clarified as 'cut everything from a heading line such as References, Works Cited or Bibliography to the end', and exclude_quotes as block quotes starting with > plus double-quoted text. Those semantics are absent from the schema, so this materially improves correct invocation.

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 ('Compare an essay against a word limit') and the comparison framing (counted vs limit, optional minimum) separates it from siblings like count_text and word_frequency. An agent can tell what this tool produces that a plain count does not.

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?

The example question ('Is this under 2000 words if I leave out the works cited and quotes?') gives a clear usage context and implies the scenario that selects this tool. It stops short of naming siblings or explicitly excluding alternatives such as plain count_text, so no true when-not guidance.

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