Skip to main content
Glama

Umi-OCR MCP Server

简体中文 | English

Предоставляет локальные возможности OCR Umi-OCR v2 AI-агентам (Hermes, Claude Code, Codex и др.) через протокол MCP.

Автоматически запускает процесс Umi-OCR, ручной запуск сервиса не требуется.

Структура каталогов

Umi-OCR-MCP/
├── server.py          # MCP 服务器(核心)
├── pyproject.toml     # 依赖声明(uv run 自动安装)
├── requirements.txt   # pip 依赖声明(备选)
├── config.yaml        # Hermes config 接入模板
└── README.md

Related MCP server: Kimi Vision MCP Server

Предварительные требования

Зависимость

Описание

Umi-OCR v2.1.5+

Скачайте версию Paddle (рекомендуется) с umi-ocr.com, после установки включите HTTP API (Настройки -> Сервис -> Включить HTTP API, порт по умолчанию 1224)

Python 3.11+

Рекомендуется управлять через uv

uv

Менеджер пакетов, используется для автоматической установки зависимостей через uv run

Быстрый старт

1. Укажите путь к Umi-OCR

Путь по умолчанию: YOUR_UMI_OCR_PATH\Umi-OCR.exe

Если путь отличается, укажите его через переменную окружения UMI_OCR_EXE.

Примечание для Windows: если путь содержит китайские символы/пробелы/спецсимволы, убедитесь, что экранирование выполнено корректно в YAML и переменных окружения.

2. Тестирование MCP-сервиса

cd YOUR_PROJECT_PATH\Umi-OCR-MCP
uv run server.py

При первом запуске uv run автоматически прочитает pyproject.toml, создаст временное виртуальное окружение и установит зависимости mcp и requests.

3. Подключение к Hermes Agent

Объедините содержимое config.yaml с секцией mcp_servers в config.yaml Hermes:

mcp_servers:
  umi-ocr-mcp:
    command: uv
    args:
      - run
      - --directory
      - YOUR_PROJECT_PATH/Umi-OCR-MCP
      - YOUR_PROJECT_PATH/Umi-OCR-MCP/server.py
    env:
      UMI_OCR_URL: "http://127.0.0.1:1224/api/ocr"
      UMI_OCR_EXE: "YOUR_UMI_OCR_PATH\\Umi-OCR.exe"

Важно: параметр --directory указывает uv, где искать pyproject.toml, его нельзя опускать. Без него uv не найдёт зависимости и сразу выдаст ModuleNotFoundError.

Формат пути: рекомендуется использовать прямые слэши D:/path/to/. Обратные слэши в YAML необходимо экранировать как D:\\path\\to\\.

Принцип работы

AI Agent -> MCP stdio -> server.py
  1. 检测端口 1224 是否开放
  2. 未开放 -> 自动启动 Umi-OCR.exe(指数退避等待,最长 30s)
  3. 开放 -> 调用 HTTP API 识别图片
  4. OCR 文本 -> 置信度过滤(>0.85)
  5. 轻量后处理(常见 OCR typo 修正)
  6. 返回纯文本给 Agent

Поддержание работы сервиса

При каждом вызове extract_text_umi_v2 автоматически проверяется порт. Если процесс Umi-OCR неожиданно завершился, при следующем вызове он будет автоматически перезапущен без ручного вмешательства.

Правила постобработки

Встроенные регулярные замены исправляют однозначные типичные ошибки OCR (не влияющие на понимание AI, не исправляются):

Исходный текст

Исправление

packspace

backspace

AMDV

AMD-V

Windows102004

Windows 10 2004

打并

打开

重新新

重新

Постобработка исправляет только однозначно определяемый шум OCR; всё, что выходит за рамки правил, остаётся без изменений и передаётся AI для смыслового понимания.

Частые вопросы

ModuleNotFoundError: No module named 'requests'

uv run по умолчанию использует изолированное окружение и не видит глобальные пакеты.

Решение: проект уже содержит pyproject.toml, убедитесь, что запуск выполняется через uv run --directory <каталог проекта> — uv автоматически установит зависимости.

Таймаут запуска Umi-OCR

  • Проверьте корректность пути UMI_OCR_EXE

  • При первом запуске Umi-OCR загружает модель PaddleOCR; на медленных машинах это может занять 15–30 секунд

  • В настройках Umi-OCR можно включить «Автозапуск при загрузке системы» или «Сворачивание в трей», чтобы не ждать каждый раз

API возвращает код ошибки

Формат API Umi-OCR v2:

POST /api/ocr
{"base64": "<base64字符串>"}

Возврат:

{"code": 100, "data": [{"text":"...","score":0.99}], "msg":"success"}
  • code=100: успех

  • code=300: ошибка декодирования Base64 (передан массив вместо строки)

  • code=802: отсутствует поле base64

Развёртывание на другом компьютере

  1. Установите uv

  2. Установите Umi-OCR (скачайте версию Paddle с umi-ocr.com) и включите HTTP API (порт 1224)

  3. Измените пути по умолчанию в config.yaml и server.py

  4. Убедитесь, что порт 1224 не занят

  5. При первом uv run потребуется интернет для автоматической загрузки зависимостей

Справочник API

Обзор инструментов

Инструмент

Назначение

Категория

Особенности токенов

quick_ocr_status

Минимальный статус сервиса

Проверка

Вывод всего ~5 символов

check_ocr_status

Полный статус сервиса

Проверка

Вывод ~200 символов

extract_text_umi_v2

OCR одной картинки

Основной

Стандартный вывод

ocr_image_base64

OCR напрямую из Base64

Основной

Без шага записи файла

ocr_batch

Пакетный OCR нескольких картинок

Пакетный

Один вызов обрабатывает несколько изображений

ocr_directory

Пакетный OCR по каталогу

Пакетный

Без list + построения списка

ocr_pdf_page

OCR одной страницы PDF напрямую

PDF

Без рендеринга + сохранения файла

quick_ocr_status

Минимальная проверка статуса, подходит для высокочастотного опроса.

参数:
  无

返回:
  "running" | "stopped" | "error: ..."

Сравнение токенов: ~5 символов против ~200 символов у check_ocr_status — экономия 97%.

check_ocr_status

Полная информация о статусе сервиса.

参数:
  无

返回:
  服务运行状态、监听地址、API 端点、可执行文件路径

extract_text_umi_v2

Извлекает текст из локального изображения. Встроенное объединение абзацев и фильтрация по уверенности.

参数:
  file_path: str              -- 图片绝对路径(必填)
  is_handwritten: bool        -- 是否手写笔记,默认 False

返回:
  str                         -- 识别文本,或错误信息

ocr_image_base64

Извлекает текст напрямую из изображения в кодировке Base64, без шага записи файла.

参数:
  image_base64: str           -- Base64 编码字符串(含 data URL 前缀亦可)
  is_handwritten: bool        -- 是否手写笔记,默认 False

返回:
  str                         -- 识别文本,或错误信息

ocr_batch

Пакетный OCR нескольких локальных изображений, один вызов возвращает все результаты.

参数:
  file_paths: List[str]       -- 图片绝对路径列表
  is_handwritten: bool        -- 是否手写笔记,默认 False

返回:
  str                         -- 按输入顺序的分隔线分区结果

ocr_directory ⭐ новое в v1.1

Сканирует все изображения в каталоге и выполняет пакетный OCR. В рекурсивном режиме обрабатывает подкаталоги.

参数:
  directory_path: str         -- 目录绝对路径(必填)
  extensions: str             -- 逗号分隔的扩展名,默认 "png,jpg,jpeg,bmp,webp"
  recursive: bool             -- 是否递归子目录,默认 False
  is_handwritten: bool        -- 是否手写笔记,默认 False
  confidence_threshold: float -- 置信度阈值,默认 0.85

返回:
  str                         -- 紧凑格式:[总数] + 文件名 + 文本

ocr_pdf_page ⭐ новое в v1.1

Напрямую рендерит указанную страницу PDF в изображение и выполняет OCR — всё за один шаг. Зависит от PyMuPDF.

参数:
  pdf_path: str               -- PDF 文件绝对路径(必填)
  page_number: int            -- 页码(1-based),默认 1
  is_handwritten: bool        -- 是否手写笔记,默认 False
  dpi: int                    -- 渲染分辨率,默认 200
  confidence_threshold: float -- 置信度阈值,默认 0.85

返回:
  str                         -- 识别文本,或错误信息

Пояснение по порогу уверенности

Все OCR-инструменты внутренне используют confidence_threshold для фильтрации низкокачественных результатов. Для прямого управления используйте параметры, доступные в новых инструментах:

Сценарий

Рекомендуемый порог

Пояснение

Чёткий печатный текст

0.90+

Максимальная точность, лучше меньше, да лучше

Стандартный документ

0.85 (по умолчанию)

Баланс точности и полноты

Сканированные учебные пособия

0.70-0.80

Качество бумаги разное, нужна большая терпимость

Рукописные заметки

0.60-0.75

Точность распознавания рукописного текста изначально ниже

Фиксированные инструкции MCP (Prompts)

Протокол MCP поддерживает Prompts — предопределённые шаблоны фиксированных инструкций. Агент вызывает их через специальный инструмент get_prompt(name), который возвращает стандартизированные пошаговые рабочие инструкции.

В server.py уже встроены 3 Prompt, покрывающие наиболее частые сценарии OCR.

Вызов в Hermes

После перезапуска MCP-подключения Hermes автоматически зарегистрирует инструмент mcp__umi_ocr__get_prompt. Способ вызова:

# 列出所有可用 Prompt
mcp__umi_ocr__list_prompts()

# 调取特定 Prompt
mcp__umi_ocr__get_prompt(name="ocr-workflow-quick")

Prompts возвращают текст инструкций (не результат выполнения). Агент читает их и по шагам вызывает соответствующие инструменты для фактического выполнения OCR.


ocr-workflow-quick

Стандартный процесс быстрого OCR одного изображения.

Шаг

Действие

Инструмент

1

Проверить, что сервис онлайн

quick_ocr_status

2

Извлечь текст

extract_text_umi_v2(file_path)

3

Качество низкое → повторить с меньшим порогом

extract_text_umi_v2(..., confidence_threshold=0.65)

Применение: скриншоты, фото одного экзаменационного листа, фото доски с записями.


ocr-workflow-pdf

Стандартный процесс постраничного OCR PDF.

Шаг

Действие

Инструмент

1

Проверить, что сервис онлайн

quick_ocr_status

2

OCR первой страницы для проверки качества

ocr_pdf_page(pdf_path, page_number=1)

3

Текст размыт → повысить DPI до 300

ocr_pdf_page(..., dpi=300)

4

Много пропущенных символов → снизить порог до 0.70

ocr_pdf_page(..., confidence_threshold=0.70)

5

Качество OK → извлекать постранично

Цикл ocr_pdf_page(pdf_path, page_number=N)

Применение: сканированные PDF с заданиями ЕГЭ, электронные учебные пособия, научные статьи.


ocr-workflow-batch

Стандартный процесс пакетного OCR целого учебного пособия/набора экзаменационных листов.

Шаг

Действие

Инструмент

1

Проверить, что сервис онлайн

quick_ocr_status

2

Сканировать все изображения в каталоге

ocr_directory(dir, recursive=true)

3

Выборочно проверить 2–3 результата

Вручную или силами агента оценить качество

4

Отдельные сбои → повторить по одному

extract_text_umi_v2(path, confidence_threshold=0.65)

5

Собрать в полный документ

Объединить, отсортировав по именам файлов

Применение: целые учебники, отсканированные постранично в несколько изображений, сборники многостраничных экзаменационных листов.

Available Tools

7 tools
check_ocr_statusA

检查 Umi-OCR 服务是否在运行以及基本状态信息。

节省 token 场景:在发起重要的 OCR 任务前,先确认服务可用, 避免在服务未启动时发起多次失败的 OCR 调用。

返回: 服务运行状态、监听地址、可执行文件路径等信息。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description discloses return information (status, address, path). It could mention idempotency or non-destructiveness, but the provided context is adequate for a read-only check.

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?

The description is well-structured with purpose, usage guidance, and return info in separate sections. It is concise, though the '节省 token 场景' line could be integrated more tightly.

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 no parameters and an output schema, the description covers the key return fields in plain language. It lacks details on error handling or potential network issues but is otherwise sufficient.

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?

No parameters exist, so the description naturally adds no parameter info. Schema coverage is 100%, meeting the baseline and earning a high score.

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 clearly states the tool checks the Umi-OCR service status, with a specific verb ('检查') and resource ('Umi-OCR 服务'). It distinguishes from siblings like 'quick_ocr_status' by providing context for usage before OCR tasks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises using this tool before important OCR tasks to confirm service availability and avoid token waste, providing clear when-to-use context.

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

extract_text_umi_v2A

调用 Umi-OCR v2.1.5 提取本地图片文本。 已内置段落合并与置信度过滤,极致节约 Token。 专为 AI 阅读理解优化:自动按 Umi-OCR 段落规则分块 + 轻量后处理。

参数: file_path: 图片的绝对本地路径 is_handwritten: 是否手写笔记(切换手写模型),默认 False

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
is_handwrittenNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/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 discloses key behaviors: automatic paragraph merging, confidence filtering, token saving, and handwriting model switching. This provides sufficient transparency for a read-only tool without destructive side effects.

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 concise (three lines for purpose, two for bullet features, two for params) with clear structure and no redundant text. Every sentence adds value, making it easy for an AI agent to parse quickly.

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 simplicity (2 parameters, output schema present), the description covers the core functionality and parameter guidance. It lacks return format details, but the output schema fills that gap. Overall, it is sufficiently complete for standard use.

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?

The schema has 0% description coverage, so the description must compensate. It meaningfully explains both parameters: file_path as 'absolute local path' and is_handwritten as 'switch handwriting model', adding context beyond the schema fields. This is adequate for the two parameters.

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 clearly states the tool extracts text from local images using Umi-OCR v2.1.5, with specific features like paragraph merging and confidence filtering. It distinguishes from sibling tools (e.g., ocr_batch, ocr_directory) that handle different inputs or batch processing, making the purpose unambiguous.

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?

The description specifies the tool is optimized for AI reading and automatically processes paragraphs, implying its use for single-image text extraction with built-in preprocessing. However, it does not explicitly state when not to use it or suggest alternatives, though sibling names provide implicit guidance.

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

ocr_batchA

批量 OCR 多张本地图片,一次调用返回所有结果。

节省 token 场景:需要 OCR 多张图片时,避免多次 MCP 调用的 往返开销,将多张图片合并为一次调用。

参数: file_paths: 图片的绝对本地路径列表 is_handwritten: 是否手写笔记,默认 False

返回: 按输入顺序返回每张图片的 OCR 结果,用分隔线区隔。

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathsYes
is_handwrittenNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that results are returned in input order and separated by delimiters, which is helpful. However, it does not mention error handling for individual image failures, size limits, or timeouts, leaving gaps for a mutation-like batch operation.

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 concise and well-structured: a one-line purpose, a usage note, parameter descriptions, and return format. Every sentence adds value with no fluff, achieving high information density.

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 simplicity (2 parameters, no annotations), the description covers purpose, usage, parameters, and return format. It lacks details on error handling, prerequisites (e.g., file existence), and limits, but the presence of an output schema mitigates the need to explain return values. Overall, sufficient for typical use.

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?

Schema coverage is 0%, so the description must compensate. It provides clear descriptions for both parameters: 'file_paths: absolute local path list' and 'is_handwritten: whether handwritten notes, default False'. This adds meaningful context beyond the schema's type and title, fully covering parameter semantics.

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 'Batch OCR multiple local images, one call returns all results', which clearly defines the action (batch OCR) and the resource (local images). It distinguishes this tool from siblings that handle single images, PDF pages, or directories, making the purpose unambiguous.

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?

The description provides a clear use case: 'Save token scenario: When needing to OCR multiple images, avoid multiple MCP call round-trips by merging into one call.' This guides when to use the tool. However, it does not explicitly exclude cases where seperate calls might be better (e.g., incremental results), which keeps it from a perfect score.

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

ocr_directoryA

批量 OCR 目录下所有图片。

节省 token 场景:无需先列出目录再构建文件列表,一步完成 目录扫描 + 批量 OCR。适合整本扫描版教辅的批量提取。

参数: directory_path: 目录绝对路径 extensions: 逗号分隔的扩展名(不含点),默认 png,jpg,jpeg,bmp,webp recursive: 是否递归子目录,默认 False is_handwritten: 是否手写笔记,默认 False confidence_threshold: 置信度阈值,默认 0.85

返回: 按文件名排序的识别结果,紧凑格式(总数 + 文件名 + 文本)。

ParametersJSON Schema
NameRequiredDescriptionDefault
recursiveNo
extensionsNopng,jpg,jpeg,bmp,webp
directory_pathYes
is_handwrittenNo
confidence_thresholdNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations, the description partially covers behavior: it mentions sorting by filename, compact format, and parameter defaults. However, it does not disclose side effects (e.g., file modification), error handling, or performance characteristics for large directories.

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 concise and well-structured: a one-line summary, a brief use-case note, and a clean parameter list. Every sentence adds value, no redundant 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 5 parameters, 1 required, and an output schema, the description covers purpose, parameters, and return format (sorted, compact). It lacks details on permissions, file size limits, or error scenarios, but is adequate for a typical agent.

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?

Schema coverage is 0%, but the description fully explains all 5 parameters: directory_path, extensions with default, recursive, is_handwritten (handwritten notes), and confidence_threshold. This adds clear meaning beyond the schema's type/default fields.

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 clearly states the verb and resource: '批量 OCR 目录下所有图片' (batch OCR all images in a directory). It highlights the one-step nature (directory scan + batch OCR) and distinguishes from siblings like ocr_batch and ocr_image_base64 by focusing on directory-level input.

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?

The description suggests a use case: saving tokens by avoiding separate directory listing, and indicates suitability for batch extraction from scanned books. However, it does not explicitly compare with sibling tools or state when not to use.

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

ocr_image_base64B

直接从 base64 编码的图片中提取文本。

节省 token 场景:当图片已经以 base64 形式存在(如粘贴板、 其他工具返回的图片数据)时,省去写入文件的步骤, 一步 OCR 到文本。

参数: image_base64: 图片的 base64 编码字符串(含或不含 data URL 前缀均可) is_handwritten: 是否手写笔记,默认 False

ParametersJSON Schema
NameRequiredDescriptionDefault
image_base64Yes
is_handwrittenNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions input format and parameter defaults but omits output format, error handling, rate limits, or size constraints. The output schema exists but the description does not reference return values.

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?

The description is concise with a clear structure: purpose, use case, parameter list. Each sentence adds value, though the token-saving scenario could be inferred. No unnecessary repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 params, no nesting) and existence of an output schema, the description is adequate but incomplete. It lacks mention of return values or error scenarios, requiring the agent to rely on the output schema.

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?

Schema description coverage is 0%, but the description adds meaning: image_base64 clarifies prefix allowance ('含或不含 data URL 前缀均可') and is_handwritten explains default false. This compensates for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Extract text directly from base64 encoded images', clearly specifying the verb and resource. It distinguishes from sibling tools (e.g., ocr_directory, ocr_pdf_page) by implying base64 input, but does not explicitly compare alternatives.

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?

The description explains a token-saving scenario when base64 is already available ('当图片已经以 base64 形式存在...省去写入文件步骤'). This provides usage context but lacks explicit when-not-to-use or comparison with siblings.

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

ocr_pdf_pageA

OCR 提取 PDF 指定页文本。

节省 token 场景:绕过 PDF→截图→存文件→OCR 的多步工作流, 一步到位。对常见的高考真题 PDF、扫描版教辅尤为高效。

参数: pdf_path: PDF 文件绝对路径 page_number: 页码(1-based,默认第 1 页) is_handwritten: 是否手写笔记,默认 False dpi: 渲染分辨率,默认 200(OCR 精度与速度的平衡点) confidence_threshold: 置信度阈值,默认 0.85

返回: 识别文本或错误信息

ParametersJSON Schema
NameRequiredDescriptionDefault
dpiNo
pdf_pathYes
page_numberNo
is_handwrittenNo
confidence_thresholdNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. Describes core behavior, parameters affecting output (e.g., is_handwritten, confidence_threshold), and return type (text or error). Lacks mention of limitations like file size or language support, but sufficient for basic usage.

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?

Well-structured with a concise purpose statement, usage scenario, parameter list, and return info. Every sentence adds value; 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?

Given 5 parameters (1 required), no annotations, and expected output, the description fully covers parameter semantics, usage context, and return values. No obvious gaps for a tool of this complexity.

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?

Schema description coverage is 0%, but description thoroughly explains each parameter: pdf_path, page_number, is_handwritten, dpi, and confidence_threshold, including defaults and rationale for dpi as a balance between accuracy and speed. Adds significant value beyond schema.

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?

Clearly states the tool's function: OCR extraction of text from a specified PDF page. Distinguishes from sibling tools by emphasizing direct PDF page OCR versus other OCR methods like image-based or batch processing.

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?

Provides explicit scenarios where the tool is beneficial (saving tokens by bypassing multi-step workflow, especially for exam PDFs and scanned textbooks). Does not specify when not to use, but context is clear.

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

quick_ocr_statusA

极简状态检查,仅返回 "running" 或 "stopped"。

节省 token 场景:替代 check_ocr_status 的完整输出(~200 tokens), 仅需 ~10 tokens 确认服务状态。适用于高频轮询场景。

返回: "running" 或 "stopped" 或 "error: ..."

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It states the return values (running/stopped/error) and the performance trade-off (saves tokens). However, it does not specify what causes errors, permissions required, or side effects, but for a simple read-only status check, this is sufficient.

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 extremely concise: two sentences and a return type list. Core information is front-loaded, and every sentence adds value. No wasted text.

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?

Given no parameters and a simple output, the description fully covers the tool's purpose, output format, and usage trade-offs. It references a sibling tool for context and mentions error cases. Output schema existence is noted, but description independently explains the return type.

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?

There are zero parameters, so the schema coverage is 100%. The description adds no parameter details, but none are needed. Baseline of 4 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?

Description clearly states the tool checks OCR service status and returns either 'running' or 'stopped'. It distinguishes itself from sibling 'check_ocr_status' by being a minimal, token-saving alternative, making the purpose and unique value immediately apparent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly recommends using this tool for high-frequency polling scenarios to save tokens, and identifies 'check_ocr_status' as the alternative when more detail is needed. This provides clear when-to-use and when-not-to-use guidance.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv1.0.0
    • First observedcheck_ocr_status
    • First observedextract_text_umi_v2
    • First observedocr_batch
    • First observedocr_directory
    • First observedocr_image_base64
    • First observedocr_pdf_page
    • First observedquick_ocr_status

TDQS

A3.9/5.0

Scored across 7 tools

Disambiguation4/5

Tools are mostly distinct: OCR methods target different input types (file, base64, PDF, batch, directory). The two status-check tools serve different granularities (detailed vs quick), but their overlap could cause slight confusion despite clear descriptions.

Naming Consistency2/5

Naming is inconsistent: some tools use 'ocr_' prefix (ocr_batch, ocr_directory), others use different patterns (check_ocr_status, quick_ocr_status, extract_text_umi_v2). The 'extract_text_umi_v2' name includes a version suffix, breaking convention.

Tool Count5/5

With 7 tools, the set is well-scoped for an OCR server. Each tool has a clear role: status checks, single-image OCR from various sources, batch, and directory scanning. No unnecessary tools.

Completeness4/5

Covers the main OCR workflow: status check, single image from file/base64/PDF, batch, and directory. Minor gaps like multi-page PDF OCR or clipboard input are absent but not critical for the core use case.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables analysis of local images through Kimi (Moonshot AI) vision models via the MCP protocol, supporting features like OCR and long context understanding.
    37 npm
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables any MCP client to perform image understanding and OCR via any OpenAI-compatible vision-language model. Supports local, private inference without images leaving the machine.
    2
    13 npm
    MIT