Skip to main content
Glama
kinbinghua-lgtm

agent-core-mcp

text_stats

Read-onlyIdempotent

Count Unicode code points, UTF-8 bytes, lines, words, sentences, and paragraphs exactly. Use it for precise, reproducible text metrics.

Instructions

Exact text statistics: Unicode code points, UTF-8 bytes, lines, non-empty lines, words, sentences, paragraphs, unique words, average word length and most frequent words. Word segmentation is Unicode-aware so non-Latin scripts are counted correctly. Use whenever a count must be exact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to measure
topNNoHow many top words to return (default 10)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, and closed-world behavior. The description adds meaningful context beyond that: Unicode-aware word segmentation and the exactness guarantee, which are important behavioral traits for a counting tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the full metric list and then the key behavioral guarantee and usage cue. Every phrase carries useful information with no redundancy.

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?

With annotations covering safety and schema covering inputs, the description's enumeration of computed metrics compensates for the absence of an output schema. It is complete enough for an agent to select and invoke the tool correctly.

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%, so both parameters are already documented. The description does not add any parameter-specific detail beyond what the schema provides, such as the meaning of topN or its default. Baseline 3 is appropriate.

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?

The description states the specific operation (exact text statistics) and enumerates the exact metrics returned, which clearly distinguishes it from siblings like diff_text, hash, or regex tools. An agent can immediately understand what the tool computes.

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?

It gives a clear usage condition: 'Use whenever a count must be exact.' This tells the agent when the tool is appropriate, though it does not name alternatives or explicitly state when not to use it.

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