Extract a document to Markdown
extract_documentConvert PDFs, scans, images, spreadsheets, and office files to Markdown with OCR and page/sheet provenance, so you can read normalized text and track where each part came from.
Instructions
Parse a PDF, scan, spreadsheet or office file to Markdown page by page (OCR included), with the page or sheet each part came from. Returns normalized text with provenance: whole-doc markdown, per-page/sheet units carrying their page or sheet, and (for spreadsheets) sheet names.
Handles PDF, spreadsheets, docx, pptx, html, txt and JPEG/PNG/WebP images. Deterministic-first; scanned PDFs and images fall back to vision OCR. Check the returned read status and issue: empty text is not proof that a document has no data.
Only the text display is truncated. Some MCP clients omit structuredContent. Keep source_version_id from upload_file; get_latest_representation and read_source_unit retrieve saved units by ID. If the IDs are unavailable, extract_pages costs 1 credit. Do not treat a truncated display as full coverage.
Extraction does not fact-check claims; whole-document or whole-slide external fact-checking is done by review_document, which reads the stored source itself.
Optional visual_rendition: true creates model-generated layout evidence for an owned JPEG/PNG and exact source_version_id. Supply an explicit idempotency_key and preserve it on uncertain recovery. Returns a partial representation and source_units IDs for read_source_unit without replacing the selected source. The dedicated visual endpoint refuses on an unsupported server; never fall back to ordinary extraction. Default extraction is unchanged. Inspect operation receipts for provider usage; a layout role is not certification.
Credits: 1
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "extract_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | lite or standard. When mode is omitted, accounts created on or after 20 November 2026 (04:00 UTC) read in lite and older accounts read in standard. lite is the faster, lower-cost read (balance estimate 0.12 credits a page); standard is the higher-accuracy read (0.75 credits a page), better on complex tables, handwriting and scans. Either can always be sent explicitly. | |
| asset_id | No | An uploaded asset ID from upload_file. Provide this OR asset_url. | |
| asset_url | No | A direct URL to the file (e.g. your own signed storage URL), so the file need not be uploaded to Webcite. Provide this OR asset_id. | |
| idempotency_key | No | Explicit operation identity for visual rendition. Preserve this key; never automatically redispatch under a new key. | |
| visual_rendition | No | Explicit JPEG/PNG layout evidence; requires owned asset_id, source_version_id and idempotency_key. | |
| source_version_id | No | Exact immutable owned source version, only with visual_rendition:true. |