Skip to main content
Glama
PSPDFKit

Nutrient DWS MCP Server

parse_document

Destructive

Extract structured data from PDFs, images, or Office files into Markdown or spatial JSON with bounding boxes, confidence scores, and reading order—from a local file or URL—for RAG and search indexing.

Instructions

Extract structured data from a document using the Nutrient DWS Data Extraction API. Reads the input file from the local file system or sandbox (if enabled), or fetches it directly from a URL — provide exactly one of filePath or url.

Output formats: • spatial — typed elements (paragraphs, tables, key-value pairs, formulas, pictures, handwriting) with bounding boxes, confidence scores, and reading order. Written to outputPath (the list can be large). • markdown — whole-document Markdown. Returned inline, or written to outputPath when provided (recommended for large documents). Good for RAG and search indexing. • Both at once via formats: ["spatial", "markdown"] — a second format costs no extra credits, so ask for both up front instead of extracting twice.

Processing modes (cost per page): text = fast Markdown, no OCR (1 credit); structure = OCR spatial (1.5 credits); understand = AI-augmented, default (9 credits); agentic = VLM-augmented (18 credits).

Note: markdown output and any extracted content are returned into this conversation and may be logged by the host. For sensitive documents, prefer spatial output to a file plus targeted extract_fields calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL of the document to extract from — fetched directly by the API instead of uploading a local file. Exactly one of filePath or url is required.
modeNoProcessing mode (cost/quality trade-off). text: fast Markdown from digital-born documents, no OCR (1 credit/page). structure: OCR-based spatial elements (1.5 credits/page). understand: AI-augmented spatial extraction, the default (9 credits/page). agentic: VLM-augmented for the most complex documents (18 credits/page).understand
formatNoSingle output format. Defaults to markdown for text mode and spatial for all other modes. Mutually exclusive with formats.
formatsNoRequest multiple output formats in one call, e.g. ["spatial", "markdown"] — both output.elements and output.markdown are returned, billed the same as a single format (no extra credits). Mutually exclusive with format.
filePathNoPath to the document to extract from (PDF, image, or Office file). Exactly one of filePath or url is required. Resolves to sandbox path if enabled, otherwise resolves to the local file system.
languageNoOCR language(s) — full name (e.g. "german"), ISO code (e.g. "deu"), or array for multilingual docs. Only applies to structure/understand/agentic modes; ignored for text mode. Leave unset for auto-detection.
maxScriptsNoMaximum number of scripts to auto-detect. Only valid when language is left unset (auto-detect), and not in text mode, which does no OCR. Server default: 2.
outputPathNoWhere to write spatial JSON output. Required when spatial is among the requested formats (the element list can be large and is kept out of the conversation). Resolves to sandbox path if enabled.
includeWordsNoInclude word-level bounding boxes in spatial output. Server default: false. Ignored for markdown output.
maxLanguagesNoMaximum number of languages to auto-detect. Only valid when language is left unset (auto-detect), and not in text mode, which does no OCR. Server default: 2.
useHtmlTablesNoMarkdown only. Render tables as HTML instead of Markdown table syntax. Server default: true.
extractWordsFromPicturesNoMarkdown only. Extract words found inside pictures into the Markdown output. Server default: false.
includeHeadersAndFootersNoMarkdown only. Include page headers and footers in the Markdown output. Server default: false.
enableSemanticBlockFormattingNoMarkdown only. Group related content into semantic blocks. Server default: true.
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

Annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=false) are consistent with the description's disclosed writes to outputPath and credit consumption; no contradiction. The description adds high-value context beyond annotations: exact credit costs per mode, the privacy caveat that extracted content 'may be logged by the host,' and the large-output behavior where spatial lists are kept out of the conversation.

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

Conciseness5/5

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

Dense but deliberately structured with bullet lists for output formats and processing modes, making the cost table and format trade-offs scannable. Every sentence carries decision-relevant information — costs, privacy, output destinations, alternatives — and the slight redundancy with schema credit figures is justified because it consolidates the choice into one place.

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?

For a 14-parameter tool with no output schema and zero required parameters, the description covers all invocation-critical aspects: input source constraint, output format destinations, mode costs, privacy/logging implications, and alternative routing to extract_fields. Nothing an agent needs to select a mode, choose a format, or avoid logging sensitive content 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 description coverage is 100%, so the baseline is 3. The description earns extra credit by explaining what each format actually yields (typed elements with bounding boxes/confidence/reading order vs whole-document Markdown) and by clarifying destination behavior — spatial goes to outputPath, markdown is inline or filed. The cost relationships across formats and modes add meaning the schema's enum descriptions only partially convey.

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?

The opening line states a specific verb+resource: 'Extract structured data from a document using the Nutrient DWS Data Extraction API.' The body further clarifies what 'structured data' means by enumerating spatial vs markdown outputs. It also distinguishes itself from siblings by naming extract_fields as the alternative for sensitive documents, separating parsing from signer/redactor/processor tools.

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?

Contains explicit decision rules: 'provide exactly one of filePath or url,' 'ask for both up front instead of extracting twice,' and mode selection framed by per-page cost/quality trade-offs. The final note gives an explicit when-not: 'For sensitive documents, prefer spatial output to a file plus targeted extract_fields calls,' and markdown is tied to RAG/search indexing use cases.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PSPDFKit/nutrient-dws-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server