convert
Transform documents into a chosen text output (Markdown, JSON, HTML, plain text, LaTeX, RAG chunks, WebVTT, Pandoc JSON, or Typst) with options for pages, OCR, images, and passwords.
Instructions
Convert a document to a chosen output format, with conversion
options, and return the result as text. to picks the format
(Markdown, docling JSON with structure and page provenance, HTML,
plain text, LaTeX, RAG chunks, WebVTT, Pandoc JSON); images embeds
pictures instead of placeholders; options sets page ranges, OCR
language and mode, text-layer-only PDFs, passwords and the rest.
For plain Markdown with default settings, convert_to_markdown is
the simpler call. Inputs and errors as for convert_to_markdown;
an unknown to, images value or option key is an error that says
what is accepted. Read-only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"uri": "<uri>"
},
"name": "convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Output format: md (Markdown, the default), json (docling's DoclingDocument: structure, tables and page provenance), html, text, latex, chunks (RAG-ready chunk records as JSON), vtt (WebVTT, for audio/video transcripts), pandoc (Pandoc's JSON AST) or typst (Typst markup). | |
| uri | Yes | The document to read: an http: or https: URL (only when the server allows URL fetching — see list_input_formats), a file: URI, a data: URI, or a file path. Relative paths resolve against the server's root; files outside it are refused. | |
| images | No | Pictures in md, html or pandoc output: placeholder (the default, an `<!-- image -->` marker) or embedded (the image as a data: URI). | |
| options | No | Conversion options, docling.rs's shared set (docs/OPTIONS.md), e.g. {"pages": "1-5"}, {"text_layer_only": true} (digital PDFs, fastest; "auto" = the text layer when it has text, OCR when it has none), {"ocr_lang": "ch"}, {"force_full_page_ocr": true}, {"do_picture_ocr": true} (OCR pictures inside Office files), {"password": "…"}, {"compact_tables": false}. A value may also be given as text ("true", "1.5"), as a form sends it. |