Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OCR_MCP_ALLOWED_DIRSNoAn os.pathsep-separated list of directories to restrict OCR file access to.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_enginesA

List OCR engines and whether each is currently usable on this machine.

Returns JSON: for each engine -> {available, status}. Call this first to see which engines compare_engines will actually run.

ocr_imageA

OCR a single image file (PNG/JPG/TIFF/BMP).

Args: path: absolute path to the image. engine: 'auto' (RapidOCR), 'rapidocr', 'tesseract', or 'finereader'. lang: ISO 639-1 code ('en','de','fr','ro',...). Mapped per-engine. preprocess: if true, apply grayscale/denoise/deskew first (needs opencv).

Returns JSON: {engine, ok, text, mean_confidence, line_count, low_confidence_count, lines:[{text,confidence,bbox}], warnings}.

ocr_pdfA

OCR a PDF by rasterizing pages (PyMuPDF) then running an engine per page.

Args: path: absolute path to the PDF. engine/lang: see ocr_image. pages: 'all' or a range like '1-3,5'. dpi: rasterization DPI (default 300; higher = slower, more accurate).

Returns JSON: {page_count, pages:[{page, ...ocr_image result...}], full_text}.

batch_ocrA

OCR many images. paths_or_glob is a glob (e.g. 'C:/scans/*.png') or a JSON list of absolute paths. Returns JSON: {count, results:[...]}.

compare_enginesA

Run ALL available engines on one image and compare them — the core accuracy tool when you have no ground truth.

Returns JSON: per-engine {text, mean_confidence, ok}, plus pairwise text similarity, average agreement, and a 'consensus_engine' (the one whose output best agrees with the others).

evaluate_accuracyA

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}.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 6 tools

Disambiguation5/5

Each tool serves a clearly distinct purpose: listing engines, OCR on single image, PDF, batch, cross-engine comparison, and accuracy evaluation. There is no overlap or ambiguity.

Naming Consistency4/5

Tool names follow a verb_noun pattern in snake_case, though some use 'ocr' as a verb prefix (ocr_image, ocr_pdf) while others use descriptive verbs (list_engines, compare_engines, evaluate_accuracy). This is mostly consistent and readable.

Tool Count5/5

Six tools is well-scoped for an OCR server, covering essential operations without bloat. Each tool earns its place.

Completeness4/5

Core OCR workflows are covered: single image, PDF, batch, engine listing, comparison, and accuracy evaluation. Minor gaps (e.g., no tool for engine configuration) but the surface is complete for typical use.

Maintenance

ActivityInactive
ResponsivenessNo issues