Skip to main content
Glama

DocRaptor MCP by usefulapi

Create a document (PDF/XLS/XLSX)

docraptor_create_document
Destructive

Generate a PDF or Excel document from HTML (document_content) or a URL (document_url). Exactly one of document_content / document_url is required. By default the document is HOSTED and the tool returns a { download_url } you can fetch — ideal for agents (no large binary in the response). Hosted documents require a paid DocRaptor add-on. Without that add-on, set hosted:false to get the raw document back as base64, or async:true to enqueue a job and poll docraptor_get_document_status. Test mode is enabled by default: PDFs are watermarked and Excel files are limited to 20 rows. Set test:false explicitly to create a real document that consumes account credits (billed). DocRaptor API: POST /docs.

Input Schema

NameRequiredDescriptionDefault
tagNoAn arbitrary tag string for your own reporting/grouping.
helpNoEnable DocRaptor help mode: emails you and DocRaptor support and retains document contents for review until resolved. Maximum five active help requests.
nameNoA name for the document (<=200 chars), shown in the DocRaptor dashboard/listing.
testNoDefault true: generate a FREE test document (watermarked PDF or Excel limited to 20 rows). Set false explicitly for a real, BILLED document.
typeNoOutput format: pdf (default), xls, or xlsx.
asyncNoIf true, enqueue the job and return a status_id (poll with docraptor_get_document_status). Best for large/slow documents. Default false.
hostedNoDefault true for synchronous requests, false for async. Requires the paid hosted-documents add-on; each download may be billed. Set false for raw base64 output without the add-on.
strictNoPDF HTML validation: html fails on invalid HTML; none disables strict HTML validation.
pipelineNoRendering pipeline/engine version, e.g. '10'. Omit to use DocRaptor's default.
referrerNoExplicit referrer for JavaScript requests, e.g. Typekit with document_content. Defaults to document_url.
javascriptNoEnable DocRaptor's JavaScript engine (default false), recommended for Typekit and Highcharts. Separate from prince_options.javascript; usually enable only one engine.
callback_urlNoURL DocRaptor POSTs after a successful async job (requires async:true). Failed jobs do not trigger callbacks.
document_urlNoA URL DocRaptor will fetch and render. Use this OR document_content.
prince_optionsNoPDF engine (Prince) options. PDF only.
document_contentNoThe HTML/XML source to render. Use this OR document_url.
hosted_expires_atNoFor hosted docs: ISO 8601 datetime when the hosted link expires.
hosted_download_limitNoFor hosted docs: max number of downloads before the link expires.
ignore_resource_errorsNoIgnore errors downloading CSS/images (DocRaptor default true). Set false to fail generation on resource errors.
ignore_console_messagesNoIgnore JavaScript console messages instead of failing generation. Defaults to false on Pipelines 1–6, true on Pipeline 7+.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed38 schema fields changed
    • addedInput schema / properties / callback_url
      Added value: +{
      +  "description": "URL DocRaptor POSTs after a successful async job (requires async:true). Failed jobs do not trigger callbacks.",
      +  "type": "string"
      +}
    • addedInput schema / properties / help
      Added value: +{
      +  "description": "Enable DocRaptor help mode: emails you and DocRaptor support and retains document contents for review until resolved. Maximum five active help requests.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / hosted / description
      Previous value: -"If true (default), DocRaptor hosts the file and returns a download_url. If false, the raw document is returned as base64."New value: +"Default true for synchronous requests, false for async. Requires the paid hosted-documents add-on; each download may be billed. Set false for raw base64 output without the add-on."
    • addedInput schema / properties / ignore_console_messages
      Added value: +{
      +  "description": "Ignore JavaScript console messages instead of failing generation. Defaults to false on Pipelines 1–6, true on Pipeline 7+.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / ignore_resource_errors
      Added value: +{
      +  "description": "Ignore errors downloading CSS/images (DocRaptor default true). Set false to fail generation on resource errors.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / javascript
      Added value: +{
      +  "description": "Enable DocRaptor's JavaScript engine (default false), recommended for Typekit and Highcharts. Separate from prince_options.javascript; usually enable only one engine.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / allow_assembly
      Added value: +{
      +  "description": "Allow document assembly even when disallow_modify is true (Pipeline 9+).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / allow_copy_for_accessibility
      Added value: +{
      +  "description": "Allow accessibility copying even when disallow_copy is true (Pipeline 9+).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / css_dpi
      Added value: +{
      +  "description": "CSS pixel resolution in dots per inch (DocRaptor default 96).",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / prince_options / properties / disallow_annotate
      Added value: +{
      +  "description": "Disallow PDF annotations.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / disallow_copy
      Added value: +{
      +  "description": "Disallow copying PDF content.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / disallow_modify
      Added value: +{
      +  "description": "Disallow PDF modifications.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / disallow_print
      Added value: +{
      +  "description": "Disallow printing the PDF.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / encrypt
      Added value: +{
      +  "description": "Encrypt PDF output.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / http_password
      Added value: +{
      +  "description": "Password for HTTP authentication when fetching resources.",
      +  "type": "string"
      +}
    • addedInput schema / properties / prince_options / properties / http_proxy
      Added value: +{
      +  "description": "HTTP proxy server used to fetch resources.",
      +  "type": "string"
      +}
    • addedInput schema / properties / prince_options / properties / http_timeout
      Added value: +{
      +  "description": "External resource request timeout in seconds (1–60; DocRaptor default 10).",
      +  "maximum": 60,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / prince_options / properties / http_user
      Added value: +{
      +  "description": "Username for HTTP authentication when fetching resources.",
      +  "type": "string"
      +}
    • addedInput schema / properties / prince_options / properties / input
      Added value: +{
      +  "description": "Input format used by Prince.",
      +  "enum": [
      +    "html",
      +    "xml",
      +    "auto"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / prince_options / properties / insecure
      Added value: +{
      +  "description": "Disable SSL verification for resource downloads (not recommended).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / prince_options / properties / javascript / description
      Previous value: -"Run JavaScript in the document before rendering. Default false."New value: +"Enable Prince's JavaScript engine (default false), separate from top-level javascript. Usually enable only one engine to avoid running scripts twice."
    • addedInput schema / properties / prince_options / properties / key_bits
      Added value: +{
      +  "anyOf": [
      +    {
      +      "const": 40,
      +      "type": "number"
      +    },
      +    {
      +      "const": 128,
      +      "type": "number"
      +    }
      +  ],
      +  "description": "PDF encryption key size: 40 or 128 bits."
      +}
    • addedInput schema / properties / prince_options / properties / no_author_style
      Added value: +{
      +  "description": "Ignore author style sheets.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / no_compress
      Added value: +{
      +  "description": "Disable PDF output compression.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / no_default_style
      Added value: +{
      +  "description": "Ignore default style sheets.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / no_embed_fonts
      Added value: +{
      +  "description": "Disable font embedding in PDF output.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / no_network
      Added value: +{
      +  "description": "Disable network access and HTTP downloads.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / no_parallel_downloads
      Added value: +{
      +  "description": "Fetch assets sequentially, useful for hosts with strict rate limits.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / no_subset_fonts
      Added value: +{
      +  "description": "Disable font subsetting in PDF output.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / no_xinclude
      Added value: +{
      +  "description": "Disable XInclude processing.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prince_options / properties / owner_password
      Added value: +{
      +  "description": "PDF owner password for controlling document permissions.",
      +  "type": "string"
      +}
    • addedInput schema / properties / prince_options / properties / profile
      Added value: +{
      +  "description": "PDF conformance profile (PDF/A, PDF/UA, or PDF/X). Supported profiles depend on the pipeline.",
      +  "enum": [
      +    "PDF/A-1a",
      +    "PDF/A-1a+PDF/UA-1",
      +    "PDF/A-1b",
      +    "PDF/A-2a",
      +    "PDF/A-2a+PDF/UA-1",
      +    "PDF/A-2b",
      +    "PDF/A-3a",
      +    "PDF/A-3a+PDF/UA-1",
      +    "PDF/A-3b",
      +    "PDF/UA-1",
      +    "PDF/X-1a:2001",
      +    "PDF/X-1a:2003",
      +    "PDF/X-3:2002",
      +    "PDF/X-3:2003",
      +    "PDF/X-4"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / prince_options / properties / user_password
      Added value: +{
      +  "description": "PDF user password, required to open the encrypted document.",
      +  "type": "string"
      +}
    • addedInput schema / properties / prince_options / properties / version
      Added value: +{
      +  "description": "Deprecated Prince version selector. Prefer the top-level pipeline parameter.",
      +  "type": "string"
      +}
    • addedInput schema / properties / referrer
      Added value: +{
      +  "description": "Explicit referrer for JavaScript requests, e.g. Typekit with document_content. Defaults to document_url.",
      +  "type": "string"
      +}
    • addedInput schema / properties / strict
      Added value: +{
      +  "description": "PDF HTML validation: html fails on invalid HTML; none disables strict HTML validation.",
      +  "enum": [
      +    "none",
      +    "html"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / test / default
      Added value: +true
    • changedInput schema / properties / test / description
      Previous value: -"If true, generate a FREE watermarked test document (does not consume credits). Default false = a real, BILLED document."New value: +"Default true: generate a FREE test document (watermarked PDF or Excel limited to 20 rows). Set false explicitly for a real, BILLED document."
  2. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With only destructiveHint=true in annotations, the description carries most of the burden and does so well: it discloses that documents are watermarked and Excel capped at 20 rows by default, that test:false consumes billed credits, that hosted mode requires a paid add-on, and that download links can expire. It stops short of describing the async return shape (a status_id field) with the same specificity it gives download_url, leaving one behavioral gap.

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?

Six tight sentences, front-loaded with the core action and input constraint, then escalating to mode selection, cost/limits, and finally the API endpoint. Every sentence carries a decision-relevant fact; nothing is padding.

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?

For a 19-parameter mutation with a deep nested object and no output schema, the description covers the highest-stakes branches (billing, watermarking, add-on requirement, sync vs async) which is what an agent most needs. The remaining gap is return-value shape outside of hosted mode — base64 payload size and the async status response are only loosely implied.

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, but the description adds real meaning: it tightens 'Use this OR document_url' into an exactly-one-of constraint, and it explains the interaction between test, hosted, and async defaults that the schema documents in isolation. It does not attempt to explain prince_options' ~35 sub-properties, which is reasonable given the schema documents them inline.

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 and resource — 'Generate a PDF or Excel document from HTML (document_content) or a URL (document_url)' — and names all three output formats via the title. An agent can immediately distinguish this from the sibling read-only helpers (list_documents, get_document_status, list_ip_addresses).

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 states the selection rule for the two mutually exclusive inputs ('Exactly one of document_content / document_url is required') and then gives decision branches: use default hosted mode for agent-friendly URLs, hosted:false if the add-on is absent, async:true for large jobs with polling via docraptor_get_document_status. It also flags the test-mode default and how to opt out, so there are no hidden surprises before invoking.

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.