Skip to main content
Glama

Docling by pagespool

Convert a document to Markdown with Docling

convert_document

Convert a document up to 25 MB and 200 pages to Markdown with Docling: OCR, tables, headings and reading order.

Pass the file as base64 in content_base64, or as a download link in file, and its name in filename. Returns task_id and task_status. Call get_conversion with the task_id until task_status is success or failure; a long PDF can take several minutes.

Costs 1 credit per PDF page converted (2 with force_ocr) and 10 credits per other file, refunded if the conversion fails. Requires an API key. The file is deleted when the conversion ends; the result is kept for 7 days.

Input Schema

NameRequiredDescriptionDefault
fileNoThe file as a download link, instead of `content_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL.
filenameYesThe file name with its extension, such as report.pdf. Docling reads PDF, Word, PowerPoint, Excel, HTML, Markdown, CSV and images.
force_ocrNoReplace a PDF's text layer with OCR text. Doubles the price of a PDF.
page_rangeNoOptional. [first, last] pages to convert, 1-based.
content_base64NoThe file content, base64-encoded. Up to 25 MB before encoding.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say it is non-read-only, open-world, non-idempotent) by disclosing cost (1 credit per PDF page, 2 with force_ocr, 10 for other files), refund-on-failure, API-key requirement, file deletion after conversion, 7-day result retention, and the 25 MB / 200 page limits. These are exactly the operational facts an agent needs before spending credits.

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 the action and limits, then input form, then the follow-up polling instruction, then cost and lifecycle. Dense and well-organized, with only minor duplication of the schema's base64/download-link wording.

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?

Covers the async workflow, cost, limits, auth, and data lifecycle, which is everything an agent needs to invoke it correctly and know when to hand off to get_conversion. An output schema exists, so return-value detail is properly left out.

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 every parameter is already documented, including the mutual exclusivity of `file` and `content_base64`. The description restates that either/or choice and the need for `filename`, but adds no format or syntax detail for `page_range` or `force_ocr` beyond the price note. Baseline 3 is appropriate where the schema does the heavy lifting.

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 Markdown with Docling') plus the feature scope (OCR, tables, headings, reading order) and hard limits. It is unmistakably distinct from the sibling get_conversion, which only polls status.

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 describes the two input paths ('Pass the file as base64 in `content_base64`, or as a download link in `file`') and then routes the agent onward: 'Call `get_conversion` with the `task_id` until `task_status` is `success` or `failure`'. It also warns that a long PDF can take several minutes, so the agent knows not to treat slowness as failure.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources