Skip to main content
Glama

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). Set hosted:false to get the raw document back as base64, or async:true to enqueue a job and poll docraptor_get_document_status. IMPORTANT: real documents consume account credits (billed). Set test:true to generate a FREE, watermarked document while developing. DocRaptor API: POST /docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoAn arbitrary tag string for your own reporting/grouping.
nameNoA name for the document (<=200 chars), shown in the DocRaptor dashboard/listing.
testNoIf true, generate a FREE watermarked test document (does not consume credits). Default false = 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.
hostedNoIf true (default), DocRaptor hosts the file and returns a download_url. If false, the raw document is returned as base64.
pipelineNoRendering pipeline/engine version, e.g. '10'. Omit to use DocRaptor's default.
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.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description adds crucial behavioral details: billing consumption, free test mode, hosted vs raw output, async polling, and required input conditions. No contradictions.

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?

The description is concise at five sentences, covering all key aspects without fluff. It could be slightly improved with bullet points for readability, but it's well-structured and front-loaded with the main action.

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?

Given the complexity (12 parameters, nested object, no output schema), the description provides essential context: input alternatives, output modes, billing, and test development. It adequately prepares an agent for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, the description still adds value by explaining mutual exclusivity of document_content/document_url, default values for hosted and test, and the difference between sync and async modes. This goes beyond mere parameter definitions.

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 description clearly states it generates PDF or Excel documents from HTML or URL, with specific verb and resource. It distinguishes itself from sibling tools (status, list, IP) as the only creation tool.

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?

Provides clear guidance on when to use document_content vs document_url, hosted vs raw, async vs sync, and test vs real. However, it does not explicitly state when not to use this tool or compare to alternative creation tools, which are absent.

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.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: creating documents, checking async status, listing metadata, and retrieving IP addresses. No overlap or ambiguity.

Naming Consistency5/5

All tools follow a consistent 'docraptor_verb_noun' pattern (e.g., docraptor_create_document, docraptor_list_ip_addresses), making naming predictable.

Tool Count5/5

With 4 tools, the set is well-scoped for the document generation domain, covering creation, status, listing, and utility functions without being excessive or insufficient.

Completeness4/5

Covers core creation (sync/async), status polling, metadata listing, and IP utilities. Minor gap: no direct retrieval of previously created documents without relying on the download URL from creation.