Skip to main content
Glama

convert

Read-only

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…

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.

Input Schema

NameRequiredDescriptionDefault
toNoOutput 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) or pandoc (Pandoc's JSON AST).
uriYesThe 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.
imagesNoPictures in md, html or pandoc output: placeholder (the default, an `<!-- image -->` marker) or embedded (the image as a data: URI).
optionsNoConversion 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.46.1
    • changedInput schema / properties / options / description
      Previous value: -"Conversion options, docling.rs's shared set (docs/OPTIONS.md), e.g.\n{\"pages\": \"1-5\"}, {\"text_layer_only\": true} (digital PDFs, fastest),\n{\"ocr_lang\": \"ch\"}, {\"force_full_page_ocr\": true},\n{\"do_picture_ocr\": true} (OCR pictures inside Office files),\n{\"password\": \"…\"}, {\"compact_tables\": false}. A value may also be\ngiven as text (\"true\", \"1.5\"), as a form sends it."New value: +"Conversion options, docling.rs's shared set (docs/OPTIONS.md), e.g.\n{\"pages\": \"1-5\"}, {\"text_layer_only\": true} (digital PDFs, fastest;\n\"auto\" = the text layer when it has text, OCR when it has none),\n{\"ocr_lang\": \"ch\"}, {\"force_full_page_ocr\": true},\n{\"do_picture_ocr\": true} (OCR pictures inside Office files),\n{\"password\": \"…\"}, {\"compact_tables\": false}. A value may also be\ngiven as text (\"true\", \"1.5\"), as a form sends it."
  2. Changed3 schema fields changedv2.46.0
    • changedInput schema / properties / images / description
      Previous value: -"Pictures in md/html/pandoc output: placeholder (default) or\nembedded (data: URIs)."New value: +"Pictures in md, html or pandoc output: placeholder (the default, an\n`<!-- image -->` marker) or embedded (the image as a data: URI)."
    • changedInput schema / properties / to / description
      Previous value: -"Output format: md (default), json (docling's DoclingDocument),\nhtml, text, latex, chunks (RAG chunk records as JSON), vtt, pandoc\n(Pandoc's JSON AST)."New value: +"Output format: md (Markdown, the default), json (docling's\nDoclingDocument: structure, tables and page provenance), html, text,\nlatex, chunks (RAG-ready chunk records as JSON), vtt (WebVTT, for\naudio/video transcripts) or pandoc (Pandoc's JSON AST)."
    • changedInput schema / properties / uri / description
      Previous value: -"The document: an http: or https: URL, a file: URI, a data: URI, or\na path (relative paths resolve against the server's root)."New value: +"The document to read: an http: or https: URL (only when the server\nallows URL fetching — see list_input_formats), a file: URI, a data:\nURI, or a file path. Relative paths resolve against the server's\nroot; files outside it are refused."
  3. Changed1 schema field changedv2.31.0
    • changedInput schema / properties / options / description
      Previous value: -"Conversion options, docling.rs's shared set (docs/OPTIONS.md), e.g.\n{\"pages\": \"1-5\"}, {\"text_layer_only\": true} (digital PDFs, fastest),\n{\"ocr_lang\": \"ch\"}, {\"force_full_page_ocr\": true},\n{\"do_picture_ocr\": true} (OCR pictures inside Office files),\n{\"password\": \"…\"}, {\"compact_tables\": false}."New value: +"Conversion options, docling.rs's shared set (docs/OPTIONS.md), e.g.\n{\"pages\": \"1-5\"}, {\"text_layer_only\": true} (digital PDFs, fastest),\n{\"ocr_lang\": \"ch\"}, {\"force_full_page_ocr\": true},\n{\"do_picture_ocr\": true} (OCR pictures inside Office files),\n{\"password\": \"…\"}, {\"compact_tables\": false}. A value may also be\ngiven as text (\"true\", \"1.5\"), as a form sends it."
  4. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description adds useful behavior beyond that by specifying that an unknown `to`, `images` value or option key is an error that reports accepted values, and that output comes back as text. It does not address rate limits, size limits, or cost of OCR-heavy conversions, so it stops short of full disclosure.

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?

Front-loaded with verb and object, then formats, then the sibling routing rule — a sensible order with no filler sentences. Slight redundancy in 'Read-only', which repeats readOnlyHint, and the format list overlaps the `to` schema description.

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?

Covers the core call shape, error semantics, and cross-references a sibling for shared input rules, which is enough for a converter with no output schema and whose return is plainly text. The open-ended `options` bag is the remaining gap, mitigated by pointing at external documentation rather than enumerating keys inline.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all four parameters are already documented, and the description largely restates them (format list, image embedding, page ranges, OCR language/passwords). The one meaningful addition is framing `options` as an open-ended shared set pointing at docs/OPTIONS.md, but the open nested object remains vague about accepted keys.

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?

States a specific verb and resource ('Convert a document to a chosen output format') and enumerates the output formats available via `to`. It explicitly names the sibling `convert_to_markdown` and the condition under which that one is preferred, so an agent can distinguish the two without opening schemas.

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?

Provides an explicit routing rule: for plain Markdown with default settings, use `convert_to_markdown`. It also delegates correctly ('Inputs and errors as for `convert_to_markdown`'), so the agent knows where the shared preconditions live rather than re-deriving them.

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

Deploy Server

Other Tools