Skip to main content
Glama
uuina

Mistral OCR MCP Server

by uuina

ocr_to_markdown_file

Converts local PDF, DOCX, or image files to Markdown via OCR and saves the output to disk. Supports page range extraction, table formats, and optional image inclusion.

Instructions

OCR 本地文件并将生成的 Markdown 保存至磁盘。

默认使用 "mistral-ocr-latest" 模型。
默认不提取图片。若需提取,需设置 include_images=True。
非常适用于 PDF 或较长文档的 OCR,以避免因结果过大而超出模型上下文窗口限制。

可调参数:
- file_path (str): 必填,本地文档(如 PDF, PPTX, DOCX)或图片文件的绝对路径。
- pages (str, 默认 ""): 指定需要提取的页码范围(如 "0-3"),为空表示提取所有页面。
- output_dir (str, 默认 ""): 指定保存 Markdown 文件的目录路径,若为空则使用默认输出目录。
- table_format (str, 默认 "markdown"): 表格输出格式。可选 "markdown"、"html" 或 None。
- include_images (bool, 默认 False): 是否提取图片。若开启,将返回并保存图片信息。
- extract_header (bool, 默认 False): 是否专门解析并提取页眉。
- extract_footer (bool, 默认 False): 是否专门解析并提取页脚。
- use_cache (bool, 默认 True): 是否启用缓存,已处理过的内容直接返回缓存路径。
- image_limit (int, 默认 0): 限制单次提取的最大图片数量。
- image_min_size (int, 默认 0): 设置提取图片的最小尺寸限制(像素)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNo
file_pathYes
use_cacheNo
output_dirNo
image_limitNo
table_formatNomarkdown
extract_footerNo
extract_headerNo
image_min_sizeNo
include_imagesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are present, so the description bears full responsibility. It discloses default model and image extraction behavior, but lacks details on destructive actions, authentication, or potential errors. The use_cache behavior is mentioned, adding some transparency.

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 front-loaded with the primary purpose, then default model and use case, followed by a structured parameter list. It is appropriately sized for 10 parameters, but could be slightly more concise by grouping defaults.

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 complexity (10 parameters, no annotations, output schema exists), the description covers purpose, use case, and all parameters thoroughly. It lacks error handling or prerequisites, but the output schema compensates for return values.

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 the description compensates fully by explaining each of the 10 parameters with examples and defaults (e.g., pages as range, output_dir as directory path). This adds significant meaning beyond the bare 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?

The description clearly states 'OCR local files and save generated Markdown to disk', with a specific verb and resource. It distinguishes from siblings like ocr_from_file (returns text) and ocr_url_to_markdown_file (URL input) by specifying local files and disk output.

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 notes it is suitable for PDFs or long documents to avoid exceeding context windows, providing clear context. However, it does not explicitly exclude alternatives or mention when not to use it.

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/uuina/mistral-ocr-mcp'

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