Skip to main content
Glama

Mistral OCR (document to markdown)

mistral_ocr
Read-onlyIdempotent

Extract text and structure from PDFs and images, returning markdown per page with support for tables, headers, footers, and annotations.

Instructions

Run Mistral OCR on a PDF or image, returning structured markdown per page.

Input document is one of:

  • { type: "document_url", documentUrl: "https://...pdf" }

  • { type: "image_url", imageUrl: "https://..." | "data:image/..." }

  • { type: "file", fileId: "" }

Options:

  • pages: array of 0-indexed page numbers or string like "0-5,7".

  • tableFormat: 'markdown' (default) or 'html'.

  • extractHeader / extractFooter: include page header/footer when present.

  • includeImageBase64: embed extracted image bytes as base64 in the response.

  • document_annotation_format: JSON schema for whole-document structured extraction.

  • bbox_annotation_format: JSON schema for extracted image / bbox annotations.

  • confidence_scores_granularity: 'page' or 'word'.

Returns pages[].markdown plus optional pages[].hyperlinks, header, footer, images bounding boxes, annotations, confidence scores, and dimensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentYes
modelNoOCR model. Default: mistral-ocr-latest.
pagesNo
tableFormatNo
extractHeaderNo
extractFooterNo
includeImageBase64No
imageLimitNo
imageMinSizeNo
bbox_annotation_formatNo
document_annotation_formatNo
document_annotation_promptNo
confidence_scores_granularityNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesYes
modelYes
pages_countYes
document_annotationNo
annotationsNo
usageNo
Behavior4/5

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

Annotations already provide readOnlyHint=true, etc. The description adds behavioral details like input types, pagination options, and return fields (markdown, hyperlinks, annotations) without contradicting annotations.

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 a summary sentence followed by bullet options and return fields. It is moderately concise but each sentence adds value. Slightly more brevity could be achieved.

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?

The description covers essential aspects: input types, all options, return values. It fails to mention default values for optional parameters (e.g., model, tableFormat) which is a minor gap, but overall complete for a complex tool.

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?

With only 8% schema coverage, the description adds significant meaning to parameters: explains document format variants, pages syntax, tableFormat, extractHeader/Footer, includeImageBase64, annotation formats, and confidence scores. A few parameters like imageLimit and document_annotation_prompt are unaddressed, but overall compensates well.

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 performs OCR on PDFs/images and returns structured markdown per page. It uses specific verbs and resources, distinguishing it from siblings like mistral_vision.

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 when to use the tool (for OCR) and lists options, but does not explicitly guide when not to use it or compare to sibling tools like mistral_vision or workflow tools.

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

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