Skip to main content
Glama

evaluate_accuracy

Evaluate OCR output by comparing extracted text or an image/PDF (OCR'd automatically) against a ground truth file. Returns CER, WER, and accuracy metrics.

Instructions

Score OCR output against a ground-truth text file (CER/WER).

Provide EITHER ocr_text (already-extracted text) OR ocr_path (an image/PDF to OCR now with engine). Compares against the UTF-8 text at ground_truth_path.

Returns JSON: {cer, wer, char_accuracy_pct, word_accuracy_pct, substitutions, deletions, insertions, hits}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ground_truth_pathYes
ocr_textNo
ocr_pathNo
engineNoauto
langNoen

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the output JSON format and the two input modes, but it doesn't address edge cases (e.g., what happens if both ocr_text and ocr_path are provided, or if files don't exist) or error behavior. Some ambiguity remains.

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?

The description is very concise with two focused paragraphs. It front-loads the core purpose, then systematically explains parameters and output. No unnecessary words.

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?

Given the tool's complexity and the presence of an output schema (though not shown in full), the description covers the return format and parameter semantics. It lacks details on error conditions and parameter exclusivity, but it is otherwise complete.

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?

The description adds rich context to all five parameters: ground_truth_path is a UTF-8 text file, ocr_text is pre-extracted text, ocr_path triggers on-the-fly OCR, engine defaults to 'auto' and is used with ocr_path, and lang defaults to 'en'. This compensates for the 0% schema coverage.

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 explicitly states the tool scores OCR output using CER/WER metrics. It clearly distinguishes itself from sibling OCR tools by focusing on evaluation, not OCR extraction.

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 specifies when to use each input parameter (ocr_text vs ocr_path) and mentions the required ground_truth_path. However, it doesn't explicitly state when not to use this tool or mention alternatives among siblings, though the differentiation is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Prekzursil/abbyy-finereader-ocr-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server