Skip to main content
Glama

Text metrics

text_metrics
Read-onlyIdempotent

Measure text deterministically: characters, words, unique words, sentences, lines, paragraphs, digits, punctuation, average word and sentence length, reading time and an Arabic/Latin language mix. Works on any language, not only Arabic.

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

Input Schema

NameRequiredDescriptionDefault
textYesThe text to measure.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds two real behavioral traits beyond them: results are deterministic/reproducible, and input may be in any language (not only Arabic). It also enumerates what comes back despite there being no output schema.

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, no filler; the verb and full metric list are front-loaded, and the language-scope caveat is placed at the end where it belongs.

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?

For a one-parameter read-only tool with no output schema, the description supplies what would otherwise be missing: the list of returned measurements plus determinism and language coverage. Nothing an agent needs to invoke it correctly is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

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

With one parameter at 100% schema coverage, the schema already defines "text". The description adds meaning the schema lacks: the input may be in any language and the output scales to the enumerated metrics, which is genuinely useful framing for the single input.

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 ("Measure") and resource (text) and enumerates the exact metric family produced: characters, words, unique words, sentences, lines, paragraphs, digits, punctuation, averages, reading time, language mix. This clearly separates it from siblings like text_chunk, text_diff, text_normalize, and text_search.

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 only implied by the metric list; there is no explicit "use this when" or "use X instead" routing, and no sibling is named. The one scope note ("works on any language, not only Arabic") clarifies applicability but doesn't tell the agent when to pick this over text_detect_language, which overlaps on language analysis.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.