Skip to main content
Glama

text_eval_metrics

Read-only

Text generation eval metrics (BLEU, ROUGE, chrF, F1, WER) — Score generated text against one or more references: candidate= and reference= (several references separated by ||; each up to 20,000 chars). Returns sacreBLEU-compatible sentence BLEU (13a tokenizer, exp smoothing, n-gram precisions, brevity penalty), ROUGE-1/2/L precision/recall/F1 (matches Google rouge-score), chrF2, SQuAD exact match and token F1, word and character error rates (WER/CER), plus overlap_score and band HIGH/MEDIUM/LOW. Optional lowercase=true for case-insensitive BLEU/chrF. Offline and deterministic; use it to evaluate LLM summaries, translations, extraction and QA answers. Price: $0.003 USDC (Base, via x402).

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": {
      "candidate": "<candidate>",
      "reference": "<reference>"
    },
    "name": "text_eval_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
candidateYesThe cat sat on the mat.
referenceYesThe cat is sitting on the mat.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Goes well past the readOnly/destructive annotations by disclosing that execution is offline and deterministic, that a per-call price of $0.003 USDC applies via x402, and by detailing the exact scoring conventions (13a tokenizer, exp smoothing, brevity penalty, rouge-score compatibility). Minor friction: "offline" sits in mild tension with openWorldHint=true and with a crypto payment step, and nothing is said about error behavior for malformed input or over-length references.

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 metrics, then parameters, then returns, then constraints and pricing — a sensible order with no filler sentences. It is dense to the point of being a single run-on block, and the return-value enumeration is long relative to how much the agent needs before calling.

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?

With no output schema, the description correctly spends space on return contents (per-metric breakdowns plus overlap_score and HIGH/MEDIUM/LOW band), and both required params are covered, so the agent knows what comes back. The gaps are the undocumented lowercase flag and the absence of any failure-mode or size-limit-exceeded behavior, which matter for a tool with a hard 20,000-char input cap.

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?

Adds meaning the schema does not carry: the schema's only text is example sentences, whereas the description explains that reference accepts several references separated by ||, caps each at 20,000 chars, and names candidate/reference roles explicitly. Against that, it advertises an optional lowercase=true flag that does not exist in the input schema, leaving genuine ambiguity about what is actually accepted.

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 concrete verb ("Score generated text against one or more references") plus the resource (text-generation eval metrics) and enumerates the exact metric families (BLEU, ROUGE, chrF2, EM/F1, WER/CER). An agent can tell this apart from text_diff, text_readability, or text_summarize without opening any schema.

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?

Gives explicit use cases ("evaluate LLM summaries, translations, extraction and QA answers"), which is strong positive guidance, but never states when not to use it or names a preferred alternative for adjacent tasks such as pairwise comparison or readability scoring. Context is clear; exclusions are absent.

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.

Resources