Skip to main content
Glama
github-community-gitam

MCP Tools Lab

analyze_text

Count words, characters, lines, and approximate sentences in text. Get quick text metrics offline.

Instructions

Count Unicode words, characters, lines, and approximate sentences.

Words are letter/digit sequences (apostrophes within words are kept). Sentences are nonempty pieces separated by '.', '!', or '?'. This is a simple heuristic, not linguistic analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose behavioral traits: exact word tokenization rules (letter/digit sequences, apostrophes preserved), sentence-splitting delimiters, and the heuristic/approximate nature of the counts. It stops short of describing the result structure or edge cases like empty input.

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 action, followed by two short definitions and a one-line caveat. Every sentence adds information about how counts are computed, with no filler.

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?

For a single-input, annotation-free computation tool with no output schema, the description covers what is counted and how tokens are defined, which is nearly enough to call it correctly. It could still state the shape of the returned counts or behavior on empty/whitespace text.

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?

There is only one parameter, named 'text', which is self-explanatory, so the low schema coverage is not costly. The tokenization definitions indirectly clarify how the input string will be interpreted, but no additional parameter semantics are needed or given.

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 gives a specific verb (count) applied to concrete resources (Unicode words, characters, lines, sentences), so the purpose is unambiguous. It does not explicitly contrast itself with siblings like hash_text or compare_text, but the resource distinction is self-evident from the wording.

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?

There is no explicit when-to-use statement or routing to a sibling. The closing line 'This is a simple heuristic, not linguistic analysis' functions as a soft when-not warning against expecting real NLP, which is useful but minimal guidance.

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