Skip to main content
Glama
Webcite MCP Server

Webcite MCP Server

Extract a document to Markdown

extract_document

Convert 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

NameRequiredDescriptionDefault
modeNolite 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_idNoAn uploaded asset ID from upload_file. Provide this OR asset_url.
asset_urlNoA 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_keyNoExplicit operation identity for visual rendition. Preserve this key; never automatically redispatch under a new key.
visual_renditionNoExplicit JPEG/PNG layout evidence; requires owned asset_id, source_version_id and idempotency_key.
source_version_idNoExact immutable owned source version, only with visual_rendition:true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.9.67

TDQS

A4.4/5.0
Behavior5/5

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

Annotations are minimal (readOnlyHint=false, destructiveHint=false), so the description carries the load and does it well: it discloses the 1-credit cost, the vision-OCR fallback, the silent-truncation failure mode ('do not treat a truncated display as full coverage'), that structuredContent may be missing, that visual_rendition produces only a partial representation and does not replace the selected source, and that idempotency_key must be preserved on uncertain recovery. That is exactly the beyond-schema behavioral context an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, but the body sprawls into five paragraphs mixing cost, truncation, siblings, visual rendition, and an opaque aside ('a layout role is not certification') that costs the reader without clear payoff. Several clauses would be better as compact bullets, and important routing info sits behind less important caveats.

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?

No output schema exists, and the description compensates by describing what comes back (Markdown extraction, source_units IDs, partial representation, possibly missing structuredContent) plus the credit cost and failure modes. Minor gaps remain — nothing about pagination of extracted pages or size limits — but nothing critical for correct invocation is missing.

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?

Schema coverage is 100%, so the baseline is 3; the description goes beyond it by explaining what visual_rendition actually produces, why idempotency_key must be reused rather than regenerated, and that source_version_id must be an exact immutable owned version. The mode parameter's account-date defaulting is left entirely to the schema.

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?

Opens with a specific verb+resource: parse a PDF/scan/spreadsheet/office file to Markdown, page by page, with OCR included. It also carves out what it is not ('Extraction does not fact-check claims; ... that is done by review_document'), so an agent can distinguish it from review_document and from extract_pages without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing cues exist: use get_latest_representation / read_source_unit to consume saved output, use extract_pages only when the returned IDs are unavailable (and at 1 credit), use review_document for fact-checking, and never fall back to ordinary extraction when the visual endpoint refuses. It gives clear context and named alternatives, but the guidance is scattered across four paragraphs and partly buried in caveats rather than stated up front.

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